diff options
Diffstat (limited to 'src/backend/executor/nodeIndexscan.c')
-rw-r--r-- | src/backend/executor/nodeIndexscan.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index ba7821b0e2b..8593c0e3050 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -822,7 +822,8 @@ ExecEndIndexScan(IndexScanState *node) /* * clear out tuple table slots */ - ExecClearTuple(node->ss.ps.ps_ResultTupleSlot); + if (node->ss.ps.ps_ResultTupleSlot) + ExecClearTuple(node->ss.ps.ps_ResultTupleSlot); ExecClearTuple(node->ss.ss_ScanTupleSlot); /* @@ -947,9 +948,9 @@ ExecInitIndexScan(IndexScan *node, EState *estate, int eflags) RelationGetDescr(currentRelation)); /* - * Initialize result slot, type and projection. + * Initialize result type and projection. */ - ExecInitResultTupleSlotTL(estate, &indexstate->ss.ps); + ExecInitResultTypeTL(&indexstate->ss.ps); ExecAssignScanProjectionInfo(&indexstate->ss); /* |