
The MAX_CARDINALITY function returns a value representing the maximum number of elements an array can contain. This is the cardinality specified on the CREATE TYPE (Array) statement for the user-defined array type.
The result of the function is BIGINT. The result cannot be null.
Assume that type PHONE_LIST is defined as:
CREATE TYPE PHONE_LIST AS INTEGER ARRAY[100]The array NUMBERS is of type PHONE_LIST. The following SET statement assigns variable CARD the value 100, in accordance with the definition of PHONE_LIST:
SET CARD = MAX_CARDINALITY(NUMBERS);
