array_length ( anyarray, integer ) → integerReturns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)
array_length(array[1,2,3], 1) → 3
array_length(array[]::int[], 1) → NULL
array_length(array['text'], 2) → NULL