The following bug has been logged on the website:
Bug reference: 8399
Logged by: Alexey Borzov
Email address: borz_off@cs.msu.su
PostgreSQL version: 9.3rc1
Operating system: irrelevant
Description:
PostgreSQL documentation states:
"Multidimensional arrays must have matching extents for each dimension. A
mismatch causes an error..."
This is not completely true:
postgres=# select cast('{{1,2}, {3}}' as integer[]);
ERROR: multidimensional arrays must have array expressions with matching
dimensions
LINE 1: select cast('{{1,2}, {3}}' as integer[]);
^
postgres=# select cast('{{1}, {2,3}}' as integer[]);
int4
------------------
{{1,NULL},{2,3}}
(1 row)
Trying to use an array constructor yields an expected error in both cases.
Confirmed on 9.3rc1 and 9.0.13