mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Remove Query->qry_aggs and qry_numaggs and replace with Query->hasAggs.
Pass List* of Aggregs into executor, and create needed array there. No longer need to double-processs Aggregs with second copy in Query. Fix crash when doing: select sum(x+1) from test where 1 > 0;
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.22 1998/01/07 21:04:01 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.23 1998/01/15 18:59:37 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1106,7 +1106,7 @@ make_material(List *tlist,
|
||||
}
|
||||
|
||||
Agg *
|
||||
make_agg(List *tlist, int nagg, Aggreg **aggs, Plan *lefttree)
|
||||
make_agg(List *tlist, Plan *lefttree)
|
||||
{
|
||||
Agg *node = makeNode(Agg);
|
||||
|
||||
@ -1116,8 +1116,7 @@ make_agg(List *tlist, int nagg, Aggreg **aggs, Plan *lefttree)
|
||||
node->plan.targetlist = tlist;
|
||||
node->plan.lefttree = lefttree;
|
||||
node->plan.righttree = (Plan *) NULL;
|
||||
node->numAgg = nagg;
|
||||
node->aggs = aggs;
|
||||
node->aggs = NIL;
|
||||
|
||||
return (node);
|
||||
}
|
||||
|
Reference in New Issue
Block a user