mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +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:
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: parsenodes.h,v 1.43 1998/01/11 03:41:49 momjian Exp $
|
||||
* $Id: parsenodes.h,v 1.44 1998/01/15 19:00:11 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -44,6 +44,7 @@ typedef struct Query
|
||||
bool isPortal; /* is this a retrieve into portal? */
|
||||
bool isBinary; /* binary portal? */
|
||||
bool unionall; /* union without unique sort */
|
||||
bool hasAggs; /* has aggregates in target list */
|
||||
|
||||
char *uniqueFlag; /* NULL, '*', or Unique attribute name */
|
||||
List *sortClause; /* a list of SortClause's */
|
||||
@@ -56,9 +57,6 @@ typedef struct Query
|
||||
* BY */
|
||||
Node *havingQual; /* qualification of each group */
|
||||
|
||||
int qry_numAgg; /* number of aggregates in the target list */
|
||||
Aggreg **qry_aggs; /* the aggregates */
|
||||
|
||||
List *unionClause; /* unions are linked under the previous query */
|
||||
|
||||
/* internal to planner */
|
||||
|
||||
Reference in New Issue
Block a user