summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/selfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/selfuncs.c')
-rw-r--r--src/backend/utils/adt/selfuncs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 71cfe6499ca..bdb7d708279 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -5547,7 +5547,7 @@ get_actual_variable_range(PlannerInfo *root, VariableStatData *vardata,
* already have at least AccessShareLock on the table, but not
* necessarily on the index.
*/
- heapRel = heap_open(rte->relid, NoLock);
+ heapRel = table_open(rte->relid, NoLock);
indexRel = index_open(index->indexoid, AccessShareLock);
/* extract index key information from the index's pg_index info */
@@ -5668,7 +5668,7 @@ get_actual_variable_range(PlannerInfo *root, VariableStatData *vardata,
ExecDropSingleTupleTableSlot(slot);
index_close(indexRel, AccessShareLock);
- heap_close(heapRel, NoLock);
+ table_close(heapRel, NoLock);
MemoryContextSwitchTo(oldcontext);
FreeExecutorState(estate);