1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Change cardinality() into a C-code function, instead of a SQL-language

alias for array_length(v,1).  The efficiency gain here is doubtless
negligible --- what I'm interested in is making sure that if we have
second thoughts about the definition, we will not have to force a
post-beta initdb to change the implementation.
This commit is contained in:
Tom Lane
2009-04-05 22:28:59 +00:00
parent eb4c723e56
commit f2110a757d
4 changed files with 30 additions and 7 deletions

View File

@ -49,7 +49,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/utils/array.h,v 1.74 2009/01/01 17:24:02 momjian Exp $
* $PostgreSQL: pgsql/src/include/utils/array.h,v 1.75 2009/04/05 22:28:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -200,6 +200,7 @@ 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_cardinality(PG_FUNCTION_ARGS);
extern Datum array_larger(PG_FUNCTION_ARGS);
extern Datum array_smaller(PG_FUNCTION_ARGS);
extern Datum generate_subscripts(PG_FUNCTION_ARGS);