diff options
Diffstat (limited to 'src/backend/executor/nodeResult.c')
-rw-r--r-- | src/backend/executor/nodeResult.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/executor/nodeResult.c b/src/backend/executor/nodeResult.c index d0413e05de1..78a744ba852 100644 --- a/src/backend/executor/nodeResult.c +++ b/src/backend/executor/nodeResult.c @@ -259,6 +259,8 @@ ExecEndResult(ResultState *node) void ExecReScanResult(ResultState *node) { + PlanState *outerPlan = outerPlanState(node); + node->rs_done = false; node->rs_checkqual = (node->resconstantqual != NULL); @@ -266,7 +268,6 @@ ExecReScanResult(ResultState *node) * If chgParam of subnode is not null then plan will be re-scanned by * first ExecProcNode. */ - if (node->ps.lefttree && - node->ps.lefttree->chgParam == NULL) - ExecReScan(node->ps.lefttree); + if (outerPlan && outerPlan->chgParam == NULL) + ExecReScan(outerPlan); } |