From f98f6ee0641e87c6ecc2524f5d0a8b54924ffd14 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 12 Nov 2008 13:09:28 +0000 Subject: array_length() function, and for SQL compatibility also cardinality() function as a special case. This version still has the suspicious behavior of returning null for an empty array (rather than zero), but this may need a wholesale revision of empty array behavior, currently under discussion. Jim Nasby, Robert Haas, Peter Eisentraut --- src/include/utils/array.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/include/utils/array.h') diff --git a/src/include/utils/array.h b/src/include/utils/array.h index 6bbc46e13be..33d9ad3207e 100644 --- a/src/include/utils/array.h +++ b/src/include/utils/array.h @@ -49,7 +49,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/array.h,v 1.69 2008/11/04 14:49:12 petere Exp $ + * $PostgreSQL: pgsql/src/include/utils/array.h,v 1.70 2008/11/12 13:09:28 petere Exp $ * *------------------------------------------------------------------------- */ @@ -199,6 +199,7 @@ extern Datum array_ndims(PG_FUNCTION_ARGS); extern Datum array_dims(PG_FUNCTION_ARGS); extern Datum array_lower(PG_FUNCTION_ARGS); extern Datum array_upper(PG_FUNCTION_ARGS); +extern Datum array_length(PG_FUNCTION_ARGS); extern Datum array_larger(PG_FUNCTION_ARGS); extern Datum array_smaller(PG_FUNCTION_ARGS); extern Datum generate_subscripts(PG_FUNCTION_ARGS); -- cgit v1.2.3