pgsql: Add a cardinality function for arrays.
| От | Robert Haas |
|---|---|
| Тема | pgsql: Add a cardinality function for arrays. |
| Дата | |
| Msg-id | E1W5fKy-0003Ui-HK@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Add a cardinality function for arrays. Unlike our other array functions, this considers the total number of elements across all dimensions, and returns 0 rather than NULL when the array has no elements. But it seems that both of those behaviors are almost universally disliked, so hopefully that's OK. Marko Tiikkaja, reviewed by Dean Rasheed and Pavel Stehule Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/01f7808b3eafcae1f6077f2f61e13b4c132ccd47 Modified Files -------------- doc/src/sgml/array.sgml | 13 +++++++++++ doc/src/sgml/func.sgml | 14 ++++++++++++ src/backend/utils/adt/arrayfuncs.c | 12 ++++++++++ src/include/catalog/catversion.h | 2 +- src/include/catalog/pg_proc.h | 2 ++ src/include/utils/array.h | 1 + src/test/regress/expected/arrays.out | 42 ++++++++++++++++++++++++++++++++++ src/test/regress/sql/arrays.sql | 8 +++++++ 8 files changed, 93 insertions(+), 1 deletion(-)
В списке pgsql-committers по дате отправления: