mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +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:
@ -337,7 +337,7 @@ currtid_for_view(Relation viewrel, ItemPointer tid)
|
||||
rte = rt_fetch(var->varno, query->rtable);
|
||||
if (rte)
|
||||
{
|
||||
heap_close(viewrel, AccessShareLock);
|
||||
table_close(viewrel, AccessShareLock);
|
||||
return DirectFunctionCall2(currtid_byreloid, ObjectIdGetDatum(rte->relid), PointerGetDatum(tid));
|
||||
}
|
||||
}
|
||||
@ -366,7 +366,7 @@ currtid_byreloid(PG_FUNCTION_ARGS)
|
||||
PG_RETURN_ITEMPOINTER(result);
|
||||
}
|
||||
|
||||
rel = heap_open(reloid, AccessShareLock);
|
||||
rel = table_open(reloid, AccessShareLock);
|
||||
|
||||
aclresult = pg_class_aclcheck(RelationGetRelid(rel), GetUserId(),
|
||||
ACL_SELECT);
|
||||
@ -383,7 +383,7 @@ currtid_byreloid(PG_FUNCTION_ARGS)
|
||||
heap_get_latest_tid(rel, snapshot, result);
|
||||
UnregisterSnapshot(snapshot);
|
||||
|
||||
heap_close(rel, AccessShareLock);
|
||||
table_close(rel, AccessShareLock);
|
||||
|
||||
PG_RETURN_ITEMPOINTER(result);
|
||||
}
|
||||
@ -400,7 +400,7 @@ currtid_byrelname(PG_FUNCTION_ARGS)
|
||||
Snapshot snapshot;
|
||||
|
||||
relrv = makeRangeVarFromNameList(textToQualifiedNameList(relname));
|
||||
rel = heap_openrv(relrv, AccessShareLock);
|
||||
rel = table_openrv(relrv, AccessShareLock);
|
||||
|
||||
aclresult = pg_class_aclcheck(RelationGetRelid(rel), GetUserId(),
|
||||
ACL_SELECT);
|
||||
@ -418,7 +418,7 @@ currtid_byrelname(PG_FUNCTION_ARGS)
|
||||
heap_get_latest_tid(rel, snapshot, result);
|
||||
UnregisterSnapshot(snapshot);
|
||||
|
||||
heap_close(rel, AccessShareLock);
|
||||
table_close(rel, AccessShareLock);
|
||||
|
||||
PG_RETURN_ITEMPOINTER(result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user