mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
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
This commit is contained in:
@@ -204,6 +204,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);
|
||||
|
Reference in New Issue
Block a user