diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-04-09 17:39:50 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-04-09 17:39:50 +0000 |
commit | 06e2757277e746fde9eeca14a86f87b7a61ff5b7 (patch) | |
tree | 258ff78625baf55b07e35b8ea7fcd993d1482633 /src/backend/utils/adt/arrayfuncs.c | |
parent | 78f58f0f70e0b6542a8ecb4e3ceaf4d41cf58cb3 (diff) | |
download | postgresql-06e2757277e746fde9eeca14a86f87b7a61ff5b7.tar.gz postgresql-06e2757277e746fde9eeca14a86f87b7a61ff5b7.zip |
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.
Diffstat (limited to 'src/backend/utils/adt/arrayfuncs.c')
-rw-r--r-- | src/backend/utils/adt/arrayfuncs.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index 8b36edc42fa..bc661ae4171 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.154 2009/04/05 22:28:59 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.155 2009/04/09 17:39:48 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1669,28 +1669,6 @@ array_length(PG_FUNCTION_ARGS) } /* - * array_cardinality : - * SQL-spec alias for array_length(v, 1) - */ -Datum -array_cardinality(PG_FUNCTION_ARGS) -{ - ArrayType *v = PG_GETARG_ARRAYTYPE_P(0); - int *dimv; - int result; - - /* Sanity check: does it look like an array at all? */ - if (ARR_NDIM(v) <= 0 || ARR_NDIM(v) > MAXDIM) - PG_RETURN_NULL(); - - dimv = ARR_DIMS(v); - - result = dimv[0]; - - PG_RETURN_INT32(result); -} - -/* * array_ref : * This routine takes an array pointer and a subscript array and returns * the referenced item as a Datum. Note that for a pass-by-reference |