summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorBruce Momjian1998-01-15 19:00:16 +0000
committerBruce Momjian1998-01-15 19:00:16 +0000
commit763ff8aef848d71da079049890786edffc3302d6 (patch)
treea1aed2a633c409071dd6d724b6db2bc7bf4fcb75 /src/include/nodes
parentf22d8e6668e36a5855c35b04cc21a4d1593298d9 (diff)
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;
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/parsenodes.h6
-rw-r--r--src/include/nodes/plannodes.h5
2 files changed, 4 insertions, 7 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 65718fc6e16..c56363ddf0c 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -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 */
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index 2dc464c2a7a..871afacbc4b 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: plannodes.h,v 1.12 1997/12/27 06:41:41 momjian Exp $
+ * $Id: plannodes.h,v 1.13 1998/01/15 19:00:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -214,8 +214,7 @@ typedef struct HashJoin
typedef struct Agg
{
Plan plan;
- int numAgg;
- Aggreg **aggs;
+ List *aggs;
AggState *aggstate;
} Agg;