postgres=# select '{}'::integer[] = array[[]]::integer[][];
?column?
----------
t
postgres=# select '{}'::integer[] = array[[[]]]::integer[][][];
From this point of view, seems N dimensions of empty array all are equivalent.
But the result of array_length of them always are null.
postgres=# select array_length('{}'::integer[],0);
array_length
--------------
postgres=# select array_length(array[[[]]]::integer[][][],0);
array_length
--------------
postgres=# select array_length(array[[[]]]::integer[][][],3) is null;
?column?
----------
t
I just think any "empty" array length should return 0, but not null. It's not a NULL array.
Is there standard definition of this behavior?
------------------
----------------------------------------------------------
iihero(Xiong He) http://www.sql9.com
----------------------------------------------------------