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

@@ -84,7 +84,7 @@ open_lo_relation(void)
/* Use RowExclusiveLock since we might either read or write */
if (lo_heap_r == NULL)
lo_heap_r = heap_open(LargeObjectRelationId, RowExclusiveLock);
lo_heap_r = table_open(LargeObjectRelationId, RowExclusiveLock);
if (lo_index_r == NULL)
lo_index_r = index_open(LargeObjectLOidPNIndexId, RowExclusiveLock);
@@ -113,7 +113,7 @@ close_lo_relation(bool isCommit)
if (lo_index_r)
index_close(lo_index_r, NoLock);
if (lo_heap_r)
heap_close(lo_heap_r, NoLock);
table_close(lo_heap_r, NoLock);
CurrentResourceOwner = currentOwner;
}
@@ -141,8 +141,8 @@ myLargeObjectExists(Oid loid, Snapshot snapshot)
BTEqualStrategyNumber, F_OIDEQ,
ObjectIdGetDatum(loid));
pg_lo_meta = heap_open(LargeObjectMetadataRelationId,
AccessShareLock);
pg_lo_meta = table_open(LargeObjectMetadataRelationId,
AccessShareLock);
sd = systable_beginscan(pg_lo_meta,
LargeObjectMetadataOidIndexId, true,
@@ -154,7 +154,7 @@ myLargeObjectExists(Oid loid, Snapshot snapshot)
systable_endscan(sd);
heap_close(pg_lo_meta, AccessShareLock);
table_close(pg_lo_meta, AccessShareLock);
return retval;
}