aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/schemacmds.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-04-14 20:03:27 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-04-14 20:03:27 +0000
commit162bd08b3f2e6783d1d75ae79f86fc444d34a28d (patch)
tree0220cd8a906557db64763a1a57dd339de313d221 /src/backend/commands/schemacmds.c
parent9dc2e6deaf66f97ff9157478a517d0f48a1e5060 (diff)
downloadpostgresql-162bd08b3f2e6783d1d75ae79f86fc444d34a28d.tar.gz
postgresql-162bd08b3f2e6783d1d75ae79f86fc444d34a28d.zip
Completion of project to use fixed OIDs for all system catalogs and
indexes. Replace all heap_openr and index_openr calls by heap_open and index_open. Remove runtime lookups of catalog OID numbers in various places. Remove relcache's support for looking up system catalogs by name. Bulky but mostly very boring patch ...
Diffstat (limited to 'src/backend/commands/schemacmds.c')
-rw-r--r--src/backend/commands/schemacmds.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c
index f6c7a624bea..678169b18a5 100644
--- a/src/backend/commands/schemacmds.c
+++ b/src/backend/commands/schemacmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.28 2005/01/27 23:23:55 neilc Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.29 2005/04/14 20:03:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,7 +16,6 @@
#include "access/heapam.h"
#include "catalog/catalog.h"
-#include "catalog/catname.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/namespace.h"
@@ -189,7 +188,7 @@ RemoveSchema(List *names, DropBehavior behavior)
* Do the deletion. Objects contained in the schema are removed by
* means of their dependency links to the schema.
*/
- object.classId = get_system_catalog_relid(NamespaceRelationName);
+ object.classId = NamespaceRelationId;
object.objectId = namespaceId;
object.objectSubId = 0;
@@ -206,7 +205,7 @@ RemoveSchemaById(Oid schemaOid)
Relation relation;
HeapTuple tup;
- relation = heap_openr(NamespaceRelationName, RowExclusiveLock);
+ relation = heap_open(NamespaceRelationId, RowExclusiveLock);
tup = SearchSysCache(NAMESPACEOID,
ObjectIdGetDatum(schemaOid),
@@ -232,7 +231,7 @@ RenameSchema(const char *oldname, const char *newname)
Relation rel;
AclResult aclresult;
- rel = heap_openr(NamespaceRelationName, RowExclusiveLock);
+ rel = heap_open(NamespaceRelationId, RowExclusiveLock);
tup = SearchSysCacheCopy(NAMESPACENAME,
CStringGetDatum(oldname),
@@ -287,7 +286,7 @@ AlterSchemaOwner(const char *name, AclId newOwnerSysId)
Relation rel;
Form_pg_namespace nspForm;
- rel = heap_openr(NamespaceRelationName, RowExclusiveLock);
+ rel = heap_open(NamespaceRelationId, RowExclusiveLock);
tup = SearchSysCache(NAMESPACENAME,
CStringGetDatum(name),