From 06e2757277e746fde9eeca14a86f87b7a61ff5b7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 9 Apr 2009 17:39:50 +0000 Subject: [PATCH] Remove SQL-compatibility function cardinality(). It is not exactly clear how this ought to behave for multi-dimensional arrays. Per discussion, not having it at all seems better than having it with what might prove to be the wrong behavior. We can always add it later when we have consensus on the correct behavior. --- doc/src/sgml/func.sgml | 18 +----------------- doc/src/sgml/release.sgml | 7 +------ src/backend/utils/adt/arrayfuncs.c | 24 +----------------------- src/include/catalog/catversion.h | 4 ++-- src/include/catalog/pg_proc.h | 4 +--- src/include/utils/array.h | 3 +-- src/test/regress/expected/arrays.out | 26 -------------------------- src/test/regress/sql/arrays.sql | 4 ---- 8 files changed, 7 insertions(+), 83 deletions(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index f42f3e9341..5c3580aec6 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ - + Functions and Operators @@ -9368,9 +9368,6 @@ SELECT NULLIF(value, '(none)') ... array_upper - - cardinality - string_to_array @@ -9503,19 +9500,6 @@ SELECT NULLIF(value, '(none)') ... array_upper(ARRAY[1,2,3,4], 1) 4 - - - - cardinality(anyarray) - - - int - returns the length of the first dimension of the array - (special case of array_length for SQL - compatibility) - cardinality(array[1,2,3]) - 3 - diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml index acd2786caa..a13828d52c 100644 --- a/doc/src/sgml/release.sgml +++ b/doc/src/sgml/release.sgml @@ -1,4 +1,4 @@ - +