Alexander Farber <alexander(dot)farber(at)gmail(dot)com> writes:
> I wonder, why the following returns NULL and not 0 in 9.5.3?
> # select array_length(array_remove(ARRAY[NULL,NULL,NULL],NULL), 1);
Because the result of the array_remove is an empty array, which is
defined to be zero-dimensional in PG.
regards, tom lane