OSDN Git Service

Support the syntax
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 15 Apr 2006 17:45:46 +0000 (17:45 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 15 Apr 2006 17:45:46 +0000 (17:45 +0000)
commit3651a3e6fb41121f2262577774382e84bf9a3177
treee09fb8fcf6851e4625f4eb5595ede6f16367056f
parentebd5257d493ac8a6f20eea667409cf9b06ac3202
Support the syntax
CREATE AGGREGATE aggname (input_type) (parameter_list)
along with the old syntax where the input type was named in the parameter
list.  This fits more naturally with the way that the aggregate is identified
in DROP AGGREGATE and other utility commands; furthermore it has a natural
extension to handle multiple-input aggregates, where the basetype-parameter
method would get ugly.  In fact, this commit fixes the grammar and all the
utility commands to support multiple-input aggregates; but DefineAggregate
rejects it because the executor isn't fixed yet.
I didn't do anything about treating agg(*) as a zero-input aggregate instead
of artificially making it a one-input aggregate, but that should be considered
in combination with supporting multi-input aggregates.
17 files changed:
doc/src/sgml/ref/create_aggregate.sgml
doc/src/sgml/xaggr.sgml
src/backend/commands/aggregatecmds.c
src/backend/commands/alter.c
src/backend/commands/comment.c
src/backend/commands/functioncmds.c
src/backend/commands/operatorcmds.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/parser/gram.y
src/backend/parser/parse_func.c
src/backend/tcop/utility.c
src/include/commands/defrem.h
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h
src/include/parser/parse_func.h
src/test/regress/expected/errors.out