ARRAY UPPER Function

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PostgreSQL ARRAY_UPPER() function

ARRAY_UPPER() function

This function is used to return upper bound of the requested array dimension.

Syntax :

array_upper(anyarray, int)

Return Type :

int

PostgreSQL Version : 9.3

Example : PostgreSQL ARRAY_UPPER() function

SELECT array_upper(ARRAY[1,3,3,5], 1);

Output :

 array_upper
-------------
           4
(1 row)