The added aggregates are:
(1) boolean-and and boolean-or aggregates named bool_and and bool_or. they (SHOULD;-) correspond to standard sql every and some/any aggregates. they do not have the right name as there is a problem with the standard and the parser for some/any. Tom also think that the standard name is misleading because NULL are ignored. Also add 'every' aggregate. (2) bitwise integer aggregates named bit_and and bit_or for int2, int4, int8 and bit types. They are not standard, but I find them useful. I needed them once. The patches adds: - 2 new very short strict functions for boolean aggregates in src/backed/utils/adt/bool.c, src/include/utils/builtins.h and src/include/catalog/pg_proc.h - the new aggregates declared in src/include/catalog/pg_proc.h and src/include/catalog/pg_aggregate.h - some documentation and validation about these new aggregates. Fabien COELHO
Showing
- doc/src/sgml/func.sgml 112 additions, 1 deletiondoc/src/sgml/func.sgml
- src/backend/utils/adt/bool.c 21 additions, 1 deletionsrc/backend/utils/adt/bool.c
- src/include/catalog/catversion.h 2 additions, 2 deletionssrc/include/catalog/catversion.h
- src/include/catalog/pg_aggregate.h 16 additions, 1 deletionsrc/include/catalog/pg_aggregate.h
- src/include/catalog/pg_proc.h 36 additions, 1 deletionsrc/include/catalog/pg_proc.h
- src/include/utils/builtins.h 3 additions, 1 deletionsrc/include/utils/builtins.h
- src/test/regress/expected/aggregates.out 136 additions, 0 deletionssrc/test/regress/expected/aggregates.out
- src/test/regress/sql/aggregates.sql 118 additions, 0 deletionssrc/test/regress/sql/aggregates.sql
Loading
Please register or sign in to comment