]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add a cardinality function for arrays.
authorRobert Haas <rhaas@postgresql.org>
Tue, 21 Jan 2014 17:38:53 +0000 (12:38 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 21 Jan 2014 17:38:53 +0000 (12:38 -0500)
commit01f7808b3eafcae1f6077f2f61e13b4c132ccd47
tree744e328b7dddbdd7294e341f6165d58e51024cdd
parent033b2343fae9d8c9df124cde62087dcb481c9c5e
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
doc/src/sgml/array.sgml
doc/src/sgml/func.sgml
src/backend/utils/adt/arrayfuncs.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/utils/array.h
src/test/regress/expected/arrays.out
src/test/regress/sql/arrays.sql