summaryrefslogtreecommitdiff
path: root/src/backend/commands/schemacmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/schemacmds.c')
-rw-r--r--src/backend/commands/schemacmds.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c
index 8367261fbe8..6cf94a3140b 100644
--- a/src/backend/commands/schemacmds.c
+++ b/src/backend/commands/schemacmds.c
@@ -220,7 +220,7 @@ RemoveSchemaById(Oid schemaOid)
Relation relation;
HeapTuple tup;
- relation = heap_open(NamespaceRelationId, RowExclusiveLock);
+ relation = table_open(NamespaceRelationId, RowExclusiveLock);
tup = SearchSysCache1(NAMESPACEOID,
ObjectIdGetDatum(schemaOid));
@@ -231,7 +231,7 @@ RemoveSchemaById(Oid schemaOid)
ReleaseSysCache(tup);
- heap_close(relation, RowExclusiveLock);
+ table_close(relation, RowExclusiveLock);
}
@@ -248,7 +248,7 @@ RenameSchema(const char *oldname, const char *newname)
ObjectAddress address;
Form_pg_namespace nspform;
- rel = heap_open(NamespaceRelationId, RowExclusiveLock);
+ rel = table_open(NamespaceRelationId, RowExclusiveLock);
tup = SearchSysCacheCopy1(NAMESPACENAME, CStringGetDatum(oldname));
if (!HeapTupleIsValid(tup))
@@ -290,7 +290,7 @@ RenameSchema(const char *oldname, const char *newname)
ObjectAddressSet(address, NamespaceRelationId, nspOid);
- heap_close(rel, NoLock);
+ table_close(rel, NoLock);
heap_freetuple(tup);
return address;
@@ -302,7 +302,7 @@ AlterSchemaOwner_oid(Oid oid, Oid newOwnerId)
HeapTuple tup;
Relation rel;
- rel = heap_open(NamespaceRelationId, RowExclusiveLock);
+ rel = table_open(NamespaceRelationId, RowExclusiveLock);
tup = SearchSysCache1(NAMESPACEOID, ObjectIdGetDatum(oid));
if (!HeapTupleIsValid(tup))
@@ -312,7 +312,7 @@ AlterSchemaOwner_oid(Oid oid, Oid newOwnerId)
ReleaseSysCache(tup);
- heap_close(rel, RowExclusiveLock);
+ table_close(rel, RowExclusiveLock);
}
@@ -328,7 +328,7 @@ AlterSchemaOwner(const char *name, Oid newOwnerId)
ObjectAddress address;
Form_pg_namespace nspform;
- rel = heap_open(NamespaceRelationId, RowExclusiveLock);
+ rel = table_open(NamespaceRelationId, RowExclusiveLock);
tup = SearchSysCache1(NAMESPACENAME, CStringGetDatum(name));
if (!HeapTupleIsValid(tup))
@@ -345,7 +345,7 @@ AlterSchemaOwner(const char *name, Oid newOwnerId)
ReleaseSysCache(tup);
- heap_close(rel, RowExclusiveLock);
+ table_close(rel, RowExclusiveLock);
return address;
}