aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeWindowAgg.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2015-05-04 16:13:07 -0400
committerRobert Haas <rhaas@postgresql.org>2015-05-04 16:17:36 -0400
commit40f42d2a34329b0b71a1287d6fd2554298dbb713 (patch)
treefb9a2cf0acfd47b94a2ff72f1757fd978353f1f6 /src/backend/executor/nodeWindowAgg.c
parent2503982be4ca48f48d2bb6e1d46160b23e4bb268 (diff)
downloadpostgresql-40f42d2a34329b0b71a1287d6fd2554298dbb713.tar.gz
postgresql-40f42d2a34329b0b71a1287d6fd2554298dbb713.zip
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.
Diffstat (limited to 'src/backend/executor/nodeWindowAgg.c')
-rw-r--r--src/backend/executor/nodeWindowAgg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c
index a06790d94a1..bf0c98d8783 100644
--- a/src/backend/executor/nodeWindowAgg.c
+++ b/src/backend/executor/nodeWindowAgg.c
@@ -2057,6 +2057,7 @@ ExecEndWindowAgg(WindowAggState *node)
void
ExecReScanWindowAgg(WindowAggState *node)
{
+ PlanState *outerPlan = outerPlanState(node);
ExprContext *econtext = node->ss.ps.ps_ExprContext;
node->all_done = false;
@@ -2082,8 +2083,8 @@ ExecReScanWindowAgg(WindowAggState *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);
}
/*