postgresql/doc/src/sgml/ref
Tom Lane 0d3f4406df Allow aggregate functions to be VARIADIC.
There's no inherent reason why an aggregate function can't be variadic
(even VARIADIC ANY) if its transition function can handle the case.
Indeed, this patch to add the feature touches none of the planner or
executor, and little of the parser; the main missing stuff was DDL and
pg_dump support.

It is true that variadic aggregates can create the same sort of ambiguity
about parameters versus ORDER BY keys that was complained of when we
(briefly) had both one- and two-argument forms of string_agg().  However,
the policy formed in response to that discussion only said that we'd not
create any built-in aggregates with varying numbers of arguments, not that
we shouldn't allow users to do it.  So the logical extension of that is
we can allow users to make variadic aggregates as long as we're wary about
shipping any such in core.

In passing, this patch allows aggregate function arguments to be named, to
the extent of remembering the names in pg_proc and dumping them in pg_dump.
You can't yet call an aggregate using named-parameter notation.  That seems
like a likely future extension, but it'll take some work, and it's not what
this patch is really about.  Likewise, there's still some work needed to
make window functions handle VARIADIC fully, but I left that for another
day.

initdb forced because of new aggvariadic field in Aggref parse nodes.
2013-09-03 17:08:46 -04:00
..
abort.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
allfiles.sgml Add a materialized view relations. 2013-03-03 18:23:31 -06:00
alter_aggregate.sgml Allow aggregate functions to be VARIADIC. 2013-09-03 17:08:46 -04:00
alter_collation.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
alter_conversion.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
alter_database.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
alter_default_privileges.sgml Remove ALTER DEFAULT PRIVILEGES' requirement of schema CREATE permissions. 2013-06-09 15:26:40 -04:00
alter_domain.sgml Add support for renaming domain constraints 2012-04-03 08:11:51 +03:00
alter_event_trigger.sgml Syntax support and documentation for event triggers. 2012-07-18 10:16:16 -04:00
alter_extension.sgml Allow aggregate functions to be VARIADIC. 2013-09-03 17:08:46 -04:00
alter_foreign_data_wrapper.sgml Add ALTER FOREIGN DATA WRAPPER / RENAME and ALTER SERVER / RENAME 2011-12-09 20:42:30 +02:00
alter_foreign_table.sgml Allow default expressions to be attached to columns of foreign tables. 2013-03-12 17:37:07 -04:00
alter_function.sgml Make CREATE/ALTER FUNCTION support NOT LEAKPROOF. 2012-02-15 10:45:08 -05:00
alter_group.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
alter_index.sgml ALTER <thing> [IF EXISTS] ... allows silent DDL if required, 2012-01-23 23:25:04 +00:00
alter_language.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
alter_large_object.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
alter_materialized_view.sgml Fix typo in docs for ALTER MATERIALIZED VIEW. 2013-03-07 11:39:36 -06:00
alter_opclass.sgml Add more ALTER <object> .. SET SCHEMA commands. 2010-11-26 17:31:54 -05:00
alter_operator.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
alter_opfamily.sgml Add SP-GiST (space-partitioned GiST) index access method. 2011-12-17 16:42:30 -05:00
alter_role.sgml Add ALTER ROLE ALL SET command 2013-02-17 23:45:36 -05:00
alter_rule.sgml Add support for ALTER RULE ... RENAME TO. 2013-02-08 23:58:40 -05:00
alter_schema.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
alter_sequence.sgml Make placeholders in SQL command help more consistent and precise 2012-06-22 01:06:14 +03:00
alter_server.sgml Make placeholders in SQL command help more consistent and precise 2012-06-22 01:06:14 +03:00
alter_table.sgml ALTER TABLE ... ALTER CONSTRAINT for FKs 2013-06-29 00:27:30 +01:00
alter_tablespace.sgml Use tablespace_option consistently on doc page 2012-10-09 08:29:37 +01:00
alter_trigger.sgml Make placeholders in SQL command help more consistent and precise 2012-06-22 01:06:14 +03:00
alter_tsconfig.sgml Add more ALTER <object> .. SET SCHEMA commands. 2010-11-26 17:31:54 -05:00
alter_tsdictionary.sgml Add more ALTER <object> .. SET SCHEMA commands. 2010-11-26 17:31:54 -05:00
alter_tsparser.sgml Add more ALTER <object> .. SET SCHEMA commands. 2010-11-26 17:31:54 -05:00
alter_tstemplate.sgml Add more ALTER <object> .. SET SCHEMA commands. 2010-11-26 17:31:54 -05:00
alter_type.sgml Documentation fix for ALTER TYPE .. RENAME 2013-05-27 11:12:54 -04:00
alter_user.sgml Add REPLICATION privilege for ROLEs 2010-12-29 11:05:03 +01:00
alter_user_mapping.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
alter_view.sgml WITH CHECK OPTION support for auto-updatable VIEWs 2013-07-18 17:10:16 -04:00
analyze.sgml Make placeholders in SQL command help more consistent and precise 2012-06-22 01:06:14 +03:00
begin.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
checkpoint.sgml Make the CHECKPOINT reference page more clear. 2011-10-18 20:14:51 -04:00
close.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
cluster.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
clusterdb.sgml Support multiple -t/--table arguments for more commands 2013-01-17 11:24:47 +01:00
comment.sgml Allow aggregate functions to be VARIADIC. 2013-09-03 17:08:46 -04:00
commit.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
commit_prepared.sgml Add compatibility information for prepared transaction commands 2012-04-16 22:40:54 +03:00
copy.sgml Remove stray | character 2013-07-05 16:21:08 +02:00
create_aggregate.sgml Allow aggregate functions to be VARIADIC. 2013-09-03 17:08:46 -04:00
create_cast.sgml Casts to or from a domain type are ignored; warn and document. 2012-04-24 09:20:53 -04:00
create_collation.sgml Make a code-cleanup pass over the collations patch. 2011-04-22 17:43:18 -04:00
create_conversion.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
create_database.sgml Fix permissions explanations in CREATE DATABASE and CREATE SCHEMA docs. 2012-10-04 13:41:01 -04:00
create_domain.sgml Add support for privileges on types 2011-12-20 00:05:19 +02:00
create_event_trigger.sgml doc: Arrange See Also links in more consistent order 2013-07-02 20:12:58 -04:00
create_extension.sgml Improve documentation about the relationship of extensions and schemas. 2013-04-04 22:37:25 -04:00
create_foreign_data_wrapper.sgml Support writable foreign tables. 2013-03-10 14:16:02 -04:00
create_foreign_table.sgml Allow default expressions to be attached to columns of foreign tables. 2013-03-12 17:37:07 -04:00
create_function.sgml Further update CREATE FUNCTION documentation about argument names 2013-06-19 22:29:13 -04:00
create_group.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
create_index.sgml Add a materialized view relations. 2013-03-03 18:23:31 -06:00
create_language.sgml Remove ancient downcasing code from procedural language operations. 2011-11-17 14:25:18 -05:00
create_materialized_view.sgml Switch user ID to the object owner when populating a materialized view. 2013-07-12 18:21:22 -04:00
create_opclass.sgml Add SP-GiST (space-partitioned GiST) index access method. 2011-12-17 16:42:30 -05:00
create_operator.sgml Add support for privileges on types 2011-12-20 00:05:19 +02:00
create_opfamily.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
create_role.sgml Make superuser imply replication privilege. The idea of a privilege that 2012-01-14 18:22:16 +02:00
create_rule.sgml Add support for ALTER RULE ... RENAME TO. 2013-02-08 23:58:40 -05:00
create_schema.sgml Fix permissions explanations in CREATE DATABASE and CREATE SCHEMA docs. 2012-10-04 13:41:01 -04:00
create_sequence.sgml Make placeholders in SQL command help more consistent and precise 2012-06-22 01:06:14 +03:00
create_server.sgml Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
create_table.sgml Remove whitespace from end of lines 2013-05-30 21:05:07 -04:00
create_table_as.sgml Add a materialized view relations. 2013-03-03 18:23:31 -06:00
create_tablespace.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
create_trigger.sgml doc: Arrange See Also links in more consistent order 2013-07-02 20:12:58 -04:00
create_tsconfig.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
create_tsdictionary.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
create_tsparser.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
create_tstemplate.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
create_type.sgml Documentation spell checking and markup improvements 2013-05-20 21:13:13 -04:00
create_user.sgml Add REPLICATION privilege for ROLEs 2010-12-29 11:05:03 +01:00
create_user_mapping.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
create_view.sgml WITH CHECK OPTION support for auto-updatable VIEWs 2013-07-18 17:10:16 -04:00
createdb.sgml doc: Fix for too many brackets in command synopses on man pages 2012-05-03 22:58:00 +03:00
createlang.sgml doc: Fix for too many brackets in command synopses on man pages 2012-05-03 22:58:00 +03:00
createuser.sgml Make documentation of --help and --version options more consistent 2012-06-18 02:46:59 +03:00
deallocate.sgml Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
declare.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
delete.sgml Provide adequate documentation of the "table_name *" notation. 2012-09-17 14:59:31 -04:00
discard.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
do.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_aggregate.sgml Allow aggregate functions to be VARIADIC. 2013-09-03 17:08:46 -04:00
drop_cast.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_collation.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_conversion.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_database.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
drop_domain.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_event_trigger.sgml Syntax support and documentation for event triggers. 2012-07-18 10:16:16 -04:00
drop_extension.sgml Make placeholders in SQL command help more consistent and precise 2012-06-22 01:06:14 +03:00
drop_foreign_data_wrapper.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_foreign_table.sgml Remove whitespace from end of lines 2011-08-07 16:11:55 +03:00
drop_function.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_group.sgml Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
drop_index.sgml Fix assorted bugs in CREATE/DROP INDEX CONCURRENTLY. 2012-11-28 21:26:01 -05:00
drop_language.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_materialized_view.sgml Add a materialized view relations. 2013-03-03 18:23:31 -06:00
drop_opclass.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
drop_operator.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_opfamily.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
drop_owned.sgml DROP OWNED: don't try to drop tablespaces/databases 2013-01-28 18:40:51 -03:00
drop_role.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_rule.sgml Add support for ALTER RULE ... RENAME TO. 2013-02-08 23:58:40 -05:00
drop_schema.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_sequence.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_server.sgml Make placeholders in SQL command help more consistent and precise 2012-06-22 01:06:14 +03:00
drop_table.sgml Improve doc wording of drop table permission. 2011-10-15 10:08:02 -04:00
drop_tablespace.sgml Make placeholders in SQL command help more consistent and precise 2012-06-22 01:06:14 +03:00
drop_trigger.sgml Make placeholders in SQL command help more consistent and precise 2012-06-22 01:06:14 +03:00
drop_tsconfig.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
drop_tsdictionary.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
drop_tsparser.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
drop_tstemplate.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
drop_type.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_user.sgml Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
drop_user_mapping.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
drop_view.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
dropdb.sgml Make documentation of --help and --version options more consistent 2012-06-18 02:46:59 +03:00
droplang.sgml doc: Fix for too many brackets in command synopses on man pages 2012-05-03 22:58:00 +03:00
dropuser.sgml Make documentation of --help and --version options more consistent 2012-06-18 02:46:59 +03:00
ecpg-ref.sgml Make documentation of --help and --version options more consistent 2012-06-18 02:46:59 +03:00
end.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
execute.sgml Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
explain.sgml Documentation spell checking and markup improvements 2013-05-20 21:13:13 -04:00
fetch.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
grant.sgml Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
initdb.sgml Allow I/O reliability checks using 16-bit checksums 2013-03-22 13:54:07 +00:00
insert.sgml Make placeholders in SQL command help more consistent and precise 2012-06-22 01:06:14 +03:00
listen.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
load.sgml Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
lock.sgml Documentation spell checking and markup improvements 2013-05-20 21:13:13 -04:00
move.sgml Duplicate expansion of "direction" from FETCH's synopsis into MOVE 2011-04-04 12:04:43 -04:00
notify.sgml Remove whitespace from end of lines 2013-05-30 21:05:07 -04:00
pg_basebackup.sgml Documentation spell checking and markup improvements 2013-05-20 21:13:13 -04:00
pg_config-ref.sgml Make documentation of --help and --version options more consistent 2012-06-18 02:46:59 +03:00
pg_controldata.sgml Some reference page improvements 2012-05-20 01:15:55 +03:00
pg_ctl-ref.sgml Revert "pg_ctl: Add idempotent option" 2013-04-29 21:55:12 -04:00
pg_dump.sgml pg_dump docs: use escaped double-quotes, for Windows 2013-07-01 14:52:59 -04:00
pg_dumpall.sgml Add -d option to pg_dumpall, for specifying a connection string. 2013-02-25 19:39:10 +02:00
pg_isready.sgml doc: Fix some whitespace issues in the man pages 2013-05-13 21:59:39 -04:00
pg_receivexlog.sgml Add -d option to pg_basebackup and pg_receivexlog, for connection string. 2013-02-25 14:59:33 +02:00
pg_resetxlog.sgml Update pg_resetxlog's documentation on multixacts 2013-06-27 15:32:58 -04:00
pg_restore.sgml Accept multiple -I, -P, -T and -n options in pg_restore. 2013-08-28 09:43:34 +03:00
postgres-ref.sgml Clarify terminology standalone backend vs. single-user mode 2013-06-20 23:03:18 -04:00
postmaster.sgml Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
prepare.sgml Change plan caching to honor, not resist, changes in search_path. 2013-01-25 14:14:41 -05:00
prepare_transaction.sgml Add compatibility information for prepared transaction commands 2012-04-16 22:40:54 +03:00
psql-ref.sgml doc: Add \dm command to psql man page 2013-05-14 21:12:34 -04:00
reassign_owned.sgml REASSIGN OWNED: handle shared objects, too 2013-01-28 18:45:50 -03:00
refresh_materialized_view.sgml Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY. 2013-07-16 12:55:44 -05:00
reindex.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
reindexdb.sgml Support multiple -t/--table arguments for more commands 2013-01-17 11:24:47 +01:00
release_savepoint.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
reset.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
revoke.sgml Make placeholders in SQL command help more consistent and precise 2012-06-22 01:06:14 +03:00
rollback.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
rollback_prepared.sgml Add compatibility information for prepared transaction commands 2012-04-16 22:40:54 +03:00
rollback_to.sgml Some markup cleanup to deconfuse the find_gt_lt tool 2011-08-30 20:32:49 +03:00
savepoint.sgml Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
security_label.sgml Allow aggregate functions to be VARIADIC. 2013-09-03 17:08:46 -04:00
select.sgml Add SQL Standard WITH ORDINALITY support for UNNEST (and any other SRF) 2013-07-29 16:38:01 +01:00
select_into.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
set.sgml Simplify handling of the timezone GUC by making initdb choose the default. 2011-09-09 17:59:11 -04:00
set_constraints.sgml Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
set_role.sgml Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
set_session_auth.sgml Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
set_transaction.sgml Tweak markup to avoid extra whitespace in man pages 2012-03-28 20:37:19 +03:00
show.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
start_transaction.sgml Implement genuine serializable isolation level. 2011-02-08 00:09:08 +02:00
truncate.sgml Provide adequate documentation of the "table_name *" notation. 2012-09-17 14:59:31 -04:00
unlisten.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00
update.sgml Provide adequate documentation of the "table_name *" notation. 2012-09-17 14:59:31 -04:00
vacuum.sgml Make placeholders in SQL command help more consistent and precise 2012-06-22 01:06:14 +03:00
vacuumdb.sgml Support multiple -t/--table arguments for more commands 2013-01-17 11:24:47 +01:00
values.sgml Fix a whitespace issue with the man pages 2011-08-07 10:55:32 +03:00