1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +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

@ -776,11 +776,11 @@ ExecGetRangeTableRelation(EState *estate, Index rti)
/*
* In a normal query, we should already have the appropriate lock,
* but verify that through an Assert. Since there's already an
* Assert inside heap_open that insists on holding some lock, it
* Assert inside table_open that insists on holding some lock, it
* seems sufficient to check this only when rellockmode is higher
* than the minimum.
*/
rel = heap_open(rte->relid, NoLock);
rel = table_open(rte->relid, NoLock);
Assert(rte->rellockmode == AccessShareLock ||
CheckRelationLockedByMe(rel, rte->rellockmode, false));
}
@ -791,7 +791,7 @@ ExecGetRangeTableRelation(EState *estate, Index rti)
* lock on the relation. This ensures sane behavior in case the
* parent process exits before we do.
*/
rel = heap_open(rte->relid, rte->rellockmode);
rel = table_open(rte->relid, rte->rellockmode);
}
estate->es_relations[rti - 1] = rel;