diff options
Diffstat (limited to 'src/backend/executor/nodeGroup.c')
-rw-r--r-- | src/backend/executor/nodeGroup.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/executor/nodeGroup.c b/src/backend/executor/nodeGroup.c index 83d562e5119..3f87716b8f1 100644 --- a/src/backend/executor/nodeGroup.c +++ b/src/backend/executor/nodeGroup.c @@ -280,6 +280,8 @@ ExecEndGroup(GroupState *node) void ExecReScanGroup(GroupState *node) { + PlanState *outerPlan = outerPlanState(node); + node->grp_done = FALSE; node->ss.ps.ps_TupFromTlist = false; /* must clear first tuple */ @@ -289,7 +291,6 @@ ExecReScanGroup(GroupState *node) * if chgParam of subnode is not null then plan will be re-scanned by * first ExecProcNode. */ - if (node->ss.ps.lefttree && - node->ss.ps.lefttree->chgParam == NULL) - ExecReScan(node->ss.ps.lefttree); + if (outerPlan->chgParam == NULL) + ExecReScan(outerPlan); } |