1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-04 20:11:56 +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

@@ -915,7 +915,7 @@ load_domaintype_info(TypeCacheEntry *typentry)
* constraints for not just this domain, but any ancestor domains, so the
* outer loop crawls up the domain stack.
*/
conRel = heap_open(ConstraintRelationId, AccessShareLock);
conRel = table_open(ConstraintRelationId, AccessShareLock);
for (;;)
{
@@ -1056,7 +1056,7 @@ load_domaintype_info(TypeCacheEntry *typentry)
ReleaseSysCache(tup);
}
heap_close(conRel, AccessShareLock);
table_close(conRel, AccessShareLock);
/*
* Only need to add one NOT NULL check regardless of how many domains in
@@ -2347,7 +2347,7 @@ load_enum_cache_data(TypeCacheEntry *tcache)
BTEqualStrategyNumber, F_OIDEQ,
ObjectIdGetDatum(tcache->type_id));
enum_rel = heap_open(EnumRelationId, AccessShareLock);
enum_rel = table_open(EnumRelationId, AccessShareLock);
enum_scan = systable_beginscan(enum_rel,
EnumTypIdLabelIndexId,
true, NULL,
@@ -2368,7 +2368,7 @@ load_enum_cache_data(TypeCacheEntry *tcache)
}
systable_endscan(enum_scan);
heap_close(enum_rel, AccessShareLock);
table_close(enum_rel, AccessShareLock);
/* Sort the items into OID order */
qsort(items, numitems, sizeof(EnumItem), enum_oid_cmp);