1
0
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:
Bruce Momjian
1998-01-15 19:00:16 +00:00
parent f22d8e6668
commit 763ff8aef8
20 changed files with 173 additions and 272 deletions

View File

@ -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);
}