From 40f42d2a34329b0b71a1287d6fd2554298dbb713 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Mon, 4 May 2015 16:13:07 -0400 Subject: Use outerPlanState macro instead of referring to leffttree. This makes the executor code more consistent. It also removes an apparently superfluous NULL test in nodeGroup.c. Qingqing Zhou, reviewed by Tom Lane, and further revised by me. --- src/backend/executor/nodeAgg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/backend/executor/nodeAgg.c') diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 9ff0eff6d7b..4a8af7b3a7e 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -2053,6 +2053,7 @@ void ExecReScanAgg(AggState *node) { ExprContext *econtext = node->ss.ps.ps_ExprContext; + PlanState *outerPlan = outerPlanState(node); int aggno; node->agg_done = false; @@ -2075,7 +2076,7 @@ ExecReScanAgg(AggState *node) * parameter changes, then we can just rescan the existing hash table; * no need to build it again. */ - if (node->ss.ps.lefttree->chgParam == NULL) + if (outerPlan->chgParam == NULL) { ResetTupleHashIterator(node->hashtable, &node->hashiter); return; @@ -2133,8 +2134,8 @@ ExecReScanAgg(AggState *node) * if chgParam of subnode is not null then plan will be re-scanned by * first ExecProcNode. */ - if (node->ss.ps.lefttree->chgParam == NULL) - ExecReScan(node->ss.ps.lefttree); + if (outerPlan->chgParam == NULL) + ExecReScan(outerPlan); } -- cgit v1.2.3