I am trying to find the number of elements in the array. Right now I am using array_upper and array_lower. Is there any other way of getting the number of elements?
You may use array_length() function, e.g. dmitigr=> SELECT array_length(ARRAY[ARRAY[1,2,3],ARRAY[4,5,6]], 1); array_length -------------- 2 (1 row)