summaryrefslogtreecommitdiff
path: root/src/include/parser/parse_func.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-12-15 17:57:48 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-12-15 17:57:48 +0000
commit34d26872ed816b299eef2fa4240d55316697f42d (patch)
treed7373e29b365c151702c44325f0f5cc9dcc3e17c /src/include/parser/parse_func.h
parent6a6efb964092902bf53965649c3ed78b1868b37e (diff)
downloadpostgresql-34d26872ed816b299eef2fa4240d55316697f42d.tar.gz
Support ORDER BY within aggregate function calls, at long last providing a
non-kluge method for controlling the order in which values are fed to an aggregate function. At the same time eliminate the old implementation restriction that DISTINCT was only supported for single-argument aggregates. Possibly release-notable behavioral change: formerly, agg(DISTINCT x) dropped null values of x unconditionally. Now, it does so only if the agg transition function is strict; otherwise nulls are treated as DISTINCT normally would, ie, you get one copy. Andrew Gierth, reviewed by Hitoshi Harada
Diffstat (limited to 'src/include/parser/parse_func.h')
-rw-r--r--src/include/parser/parse_func.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h
index 0a38f740b1..8521f25cea 100644
--- a/src/include/parser/parse_func.h
+++ b/src/include/parser/parse_func.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/parser/parse_func.h,v 1.66 2009/10/08 02:39:25 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/parser/parse_func.h,v 1.67 2009/12/15 17:57:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,7 +44,8 @@ typedef enum
extern Node *ParseFuncOrColumn(ParseState *pstate,
List *funcname, List *fargs,
- bool agg_star, bool agg_distinct, bool func_variadic,
+ List *agg_order, bool agg_star, bool agg_distinct,
+ bool func_variadic,
WindowDef *over, bool is_column, int location);
extern FuncDetailCode func_get_detail(List *funcname,