mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +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:
@@ -403,7 +403,7 @@ enum_endpoint(Oid enumtypoid, ScanDirection direction)
|
||||
BTEqualStrategyNumber, F_OIDEQ,
|
||||
ObjectIdGetDatum(enumtypoid));
|
||||
|
||||
enum_rel = heap_open(EnumRelationId, AccessShareLock);
|
||||
enum_rel = table_open(EnumRelationId, AccessShareLock);
|
||||
enum_idx = index_open(EnumTypIdSortOrderIndexId, AccessShareLock);
|
||||
enum_scan = systable_beginscan_ordered(enum_rel, enum_idx, NULL,
|
||||
1, &skey);
|
||||
@@ -423,7 +423,7 @@ enum_endpoint(Oid enumtypoid, ScanDirection direction)
|
||||
|
||||
systable_endscan_ordered(enum_scan);
|
||||
index_close(enum_idx, AccessShareLock);
|
||||
heap_close(enum_rel, AccessShareLock);
|
||||
table_close(enum_rel, AccessShareLock);
|
||||
|
||||
return minmax;
|
||||
}
|
||||
@@ -562,7 +562,7 @@ enum_range_internal(Oid enumtypoid, Oid lower, Oid upper)
|
||||
BTEqualStrategyNumber, F_OIDEQ,
|
||||
ObjectIdGetDatum(enumtypoid));
|
||||
|
||||
enum_rel = heap_open(EnumRelationId, AccessShareLock);
|
||||
enum_rel = table_open(EnumRelationId, AccessShareLock);
|
||||
enum_idx = index_open(EnumTypIdSortOrderIndexId, AccessShareLock);
|
||||
enum_scan = systable_beginscan_ordered(enum_rel, enum_idx, NULL, 1, &skey);
|
||||
|
||||
@@ -598,7 +598,7 @@ enum_range_internal(Oid enumtypoid, Oid lower, Oid upper)
|
||||
|
||||
systable_endscan_ordered(enum_scan);
|
||||
index_close(enum_idx, AccessShareLock);
|
||||
heap_close(enum_rel, AccessShareLock);
|
||||
table_close(enum_rel, AccessShareLock);
|
||||
|
||||
/* and build the result array */
|
||||
/* note this hardwires some details about the representation of Oid */
|
||||
|
||||
Reference in New Issue
Block a user