1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00

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
This commit is contained in:
Andres Freund
2019-01-21 10:32:19 -08:00
parent 111944c5ee
commit e0c4ec0728
114 changed files with 1259 additions and 1259 deletions

View File

@ -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;
}