aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/schemacmds.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2019-01-21 10:32:19 -0800
committerAndres Freund <andres@anarazel.de>2019-01-21 10:51:37 -0800
commite0c4ec07284db817e1f8d9adfb3fffc952252db0 (patch)
treead56d635b246f6d4d0d7a17b2a4ac797d7227b62 /src/backend/commands/schemacmds.c
parent111944c5ee567f1c45bf0f1ecfdec682af467aa6 (diff)
downloadpostgresql-e0c4ec07284db817e1f8d9adfb3fffc952252db0.tar.gz
postgresql-e0c4ec07284db817e1f8d9adfb3fffc952252db0.zip
Replace uses of heap_open et al with the corresponding table_* function.
Author: Andres Freund Discussion: https://postgr.es/m/20190111000539.xbv7s6w7ilcvm7dp@alap3.anarazel.de
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;
}