From e0c4ec07284db817e1f8d9adfb3fffc952252db0 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Mon, 21 Jan 2019 10:32:19 -0800 Subject: 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 --- src/backend/commands/comment.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/backend/commands/comment.c') diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c index d4714a5c1f8..98b4b3e7b16 100644 --- a/src/backend/commands/comment.c +++ b/src/backend/commands/comment.c @@ -185,7 +185,7 @@ CreateComments(Oid oid, Oid classoid, int32 subid, const char *comment) BTEqualStrategyNumber, F_INT4EQ, Int32GetDatum(subid)); - description = heap_open(DescriptionRelationId, RowExclusiveLock); + description = table_open(DescriptionRelationId, RowExclusiveLock); sd = systable_beginscan(description, DescriptionObjIndexId, true, NULL, 3, skey); @@ -222,7 +222,7 @@ CreateComments(Oid oid, Oid classoid, int32 subid, const char *comment) /* Done */ - heap_close(description, NoLock); + table_close(description, NoLock); } /* @@ -275,7 +275,7 @@ CreateSharedComments(Oid oid, Oid classoid, const char *comment) BTEqualStrategyNumber, F_OIDEQ, ObjectIdGetDatum(classoid)); - shdescription = heap_open(SharedDescriptionRelationId, RowExclusiveLock); + shdescription = table_open(SharedDescriptionRelationId, RowExclusiveLock); sd = systable_beginscan(shdescription, SharedDescriptionObjIndexId, true, NULL, 2, skey); @@ -312,7 +312,7 @@ CreateSharedComments(Oid oid, Oid classoid, const char *comment) /* Done */ - heap_close(shdescription, NoLock); + table_close(shdescription, NoLock); } /* @@ -353,7 +353,7 @@ DeleteComments(Oid oid, Oid classoid, int32 subid) else nkeys = 2; - description = heap_open(DescriptionRelationId, RowExclusiveLock); + description = table_open(DescriptionRelationId, RowExclusiveLock); sd = systable_beginscan(description, DescriptionObjIndexId, true, NULL, nkeys, skey); @@ -364,7 +364,7 @@ DeleteComments(Oid oid, Oid classoid, int32 subid) /* Done */ systable_endscan(sd); - heap_close(description, RowExclusiveLock); + table_close(description, RowExclusiveLock); } /* @@ -389,7 +389,7 @@ DeleteSharedComments(Oid oid, Oid classoid) BTEqualStrategyNumber, F_OIDEQ, ObjectIdGetDatum(classoid)); - shdescription = heap_open(SharedDescriptionRelationId, RowExclusiveLock); + shdescription = table_open(SharedDescriptionRelationId, RowExclusiveLock); sd = systable_beginscan(shdescription, SharedDescriptionObjIndexId, true, NULL, 2, skey); @@ -400,7 +400,7 @@ DeleteSharedComments(Oid oid, Oid classoid) /* Done */ systable_endscan(sd); - heap_close(shdescription, RowExclusiveLock); + table_close(shdescription, RowExclusiveLock); } /* @@ -431,7 +431,7 @@ GetComment(Oid oid, Oid classoid, int32 subid) BTEqualStrategyNumber, F_INT4EQ, Int32GetDatum(subid)); - description = heap_open(DescriptionRelationId, AccessShareLock); + description = table_open(DescriptionRelationId, AccessShareLock); tupdesc = RelationGetDescr(description); sd = systable_beginscan(description, DescriptionObjIndexId, true, @@ -453,7 +453,7 @@ GetComment(Oid oid, Oid classoid, int32 subid) systable_endscan(sd); /* Done */ - heap_close(description, AccessShareLock); + table_close(description, AccessShareLock); return comment; } -- cgit v1.2.3