From 7028c13557067ec2cad0febcc0671551fce3190d Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 23 Oct 2008 15:29:23 +0000 Subject: Fix an oversight in two different recent patches: nodes that support SRFs in their targetlists had better reset ps_TupFromTlist during ReScan calls. There's no need to back-patch here since nodeAgg and nodeGroup didn't even pretend to support SRFs in prior releases. --- src/backend/executor/nodeAgg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/backend/executor/nodeAgg.c') diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 1af10dfefc3..d0f21861304 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -61,7 +61,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.162 2008/10/16 19:25:55 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/executor/nodeAgg.c,v 1.163 2008/10/23 15:29:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1284,6 +1284,8 @@ ExecInitAgg(Agg *node, EState *estate, int eflags) ExecAssignResultTypeFromTL(&aggstate->ss.ps); ExecAssignProjectionInfo(&aggstate->ss.ps, NULL); + aggstate->ss.ps.ps_TupFromTlist = false; + /* * get the count of aggregates in targetlist and quals */ @@ -1647,6 +1649,8 @@ ExecReScanAgg(AggState *node, ExprContext *exprCtxt) node->agg_done = false; + node->ss.ps.ps_TupFromTlist = false; + if (((Agg *) node->ss.ps.plan)->aggstrategy == AGG_HASHED) { /* -- cgit v1.2.3