aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execScan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/execScan.c')
-rw-r--r--src/backend/executor/execScan.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/backend/executor/execScan.c b/src/backend/executor/execScan.c
index 79dbc38b174..881131aff26 100644
--- a/src/backend/executor/execScan.c
+++ b/src/backend/executor/execScan.c
@@ -40,7 +40,7 @@ ExecScanFetch(ScanState *node,
CHECK_FOR_INTERRUPTS();
- if (estate->es_epqTuple != NULL)
+ if (estate->es_epqTupleSlot != NULL)
{
/*
* We are inside an EvalPlanQual recheck. Return the test tuple if
@@ -63,7 +63,7 @@ ExecScanFetch(ScanState *node,
ExecClearTuple(slot); /* would not be returned by scan */
return slot;
}
- else if (estate->es_epqTupleSet[scanrelid - 1])
+ else if (estate->es_epqTupleSlot[scanrelid - 1] != NULL)
{
TupleTableSlot *slot = node->ss_ScanTupleSlot;
@@ -73,17 +73,15 @@ ExecScanFetch(ScanState *node,
/* Else mark to remember that we shouldn't return more */
estate->es_epqScanDone[scanrelid - 1] = true;
- /* Return empty slot if we haven't got a test tuple */
- if (estate->es_epqTuple[scanrelid - 1] == NULL)
- return ExecClearTuple(slot);
+ slot = estate->es_epqTupleSlot[scanrelid - 1];
- /* Store test tuple in the plan node's scan slot */
- ExecForceStoreHeapTuple(estate->es_epqTuple[scanrelid - 1],
- slot);
+ /* Return empty slot if we haven't got a test tuple */
+ if (TupIsNull(slot))
+ return NULL;
/* Check if it meets the access-method conditions */
if (!(*recheckMtd) (node, slot))
- ExecClearTuple(slot); /* would not be returned by scan */
+ return ExecClearTuple(slot); /* would not be returned by scan */
return slot;
}