OSDN Git Service

Implement 4 new aggregate functions from SQL2003. Specifically: var_pop(),
authorNeil Conway <neilc@samurai.com>
Fri, 10 Mar 2006 20:15:28 +0000 (20:15 +0000)
committerNeil Conway <neilc@samurai.com>
Fri, 10 Mar 2006 20:15:28 +0000 (20:15 +0000)
commit0ebf1cc83465a4058c172d74c823cce0bebe0e11
tree40fc45919c06e9177a6ae5128a89b65773d36f16
parentab812ef3260adb8f12e0fbc66a32080283def0e2
Implement 4 new aggregate functions from SQL2003. Specifically: var_pop(),
var_samp(), stddev_pop(), and stddev_samp(). var_samp() and stddev_samp()
are just renamings of the historical Postgres aggregates variance() and
stddev() -- the latter names have been kept for backward compatibility.
This patch includes updates for the documentation and regression tests.
The catversion has been bumped.

NB: SQL2003 requires that DISTINCT not be specified for any of these
aggregates. Per discussion on -patches, I have NOT implemented this
restriction: if the user asks for stddev(DISTINCT x), presumably they
know what they are doing.
doc/src/sgml/func.sgml
src/backend/utils/adt/float.c
src/backend/utils/adt/numeric.c
src/include/catalog/catversion.h
src/include/catalog/pg_aggregate.h
src/include/catalog/pg_proc.h
src/include/utils/builtins.h
src/test/regress/expected/aggregates.out
src/test/regress/sql/aggregates.sql