summaryrefslogtreecommitdiff
path: root/src/backend/commands/comment.c
diff options
context:
space:
mode:
authorAndres Freund2019-01-21 18:32:19 +0000
committerAndres Freund2019-01-21 18:51:37 +0000
commite0c4ec07284db817e1f8d9adfb3fffc952252db0 (patch)
treead56d635b246f6d4d0d7a17b2a4ac797d7227b62 /src/backend/commands/comment.c
parent111944c5ee567f1c45bf0f1ecfdec682af467aa6 (diff)
Replace uses of heap_open et al with the corresponding table_* function.
Author: Andres Freund Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/commands/comment.c')
-rw-r--r--src/backend/commands/comment.c20
1 files changed, 10 insertions, 10 deletions
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;
}