-
- Downloads
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.
Showing
- doc/src/sgml/func.sgml 81 additions, 2 deletionsdoc/src/sgml/func.sgml
- src/backend/utils/adt/float.c 68 additions, 10 deletionssrc/backend/utils/adt/float.c
- src/backend/utils/adt/numeric.c 83 additions, 74 deletionssrc/backend/utils/adt/numeric.c
- src/include/catalog/catversion.h 2 additions, 2 deletionssrc/include/catalog/catversion.h
- src/include/catalog/pg_aggregate.h 48 additions, 16 deletionssrc/include/catalog/pg_aggregate.h
- src/include/catalog/pg_proc.h 45 additions, 9 deletionssrc/include/catalog/pg_proc.h
- src/include/utils/builtins.h 9 additions, 5 deletionssrc/include/utils/builtins.h
- src/test/regress/expected/aggregates.out 62 additions, 0 deletionssrc/test/regress/expected/aggregates.out
- src/test/regress/sql/aggregates.sql 14 additions, 10 deletionssrc/test/regress/sql/aggregates.sql
Loading
Please register or sign in to comment