aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_func.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-03-21 09:20:53 -0400
committerRobert Haas <rhaas@postgresql.org>2016-03-21 09:30:18 -0400
commite06a38965b3bcdaa881e7e06892d4d8ab6c2c980 (patch)
tree7fe176a2301090c3bec08999ff77b8d0ab90fabe /src/backend/parser/parse_func.c
parent7fa0064092e135415a558dc3c4d7393d14ab6d8e (diff)
downloadpostgresql-e06a38965b3bcdaa881e7e06892d4d8ab6c2c980.tar.gz
postgresql-e06a38965b3bcdaa881e7e06892d4d8ab6c2c980.zip
Support parallel aggregation.
Parallel workers can now partially aggregate the data and pass the transition values back to the leader, which can combine the partial results to produce the final answer. David Rowley, based on earlier work by Haribabu Kommi. Reviewed by Álvaro Herrera, Tomas Vondra, Amit Kapila, James Sewell, and me.
Diffstat (limited to 'src/backend/parser/parse_func.c')
-rw-r--r--src/backend/parser/parse_func.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c
index 9744d0dc689..485960f753c 100644
--- a/src/backend/parser/parse_func.c
+++ b/src/backend/parser/parse_func.c
@@ -647,7 +647,8 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
Aggref *aggref = makeNode(Aggref);
aggref->aggfnoid = funcid;
- aggref->aggtype = rettype;
+ /* default the outputtype to be the same as aggtype */
+ aggref->aggtype = aggref->aggoutputtype = rettype;
/* aggcollid and inputcollid will be set by parse_collate.c */
/* aggdirectargs and args will be set by transformAggregateCall */
/* aggorder and aggdistinct will be set by transformAggregateCall */