Tom Lane wrote:
> Seems like we ought to clean this up. I'm not sure which way to jump
> though: should we decree that arrays of no elements must always have
> zero dimensions, or should we get rid of that and standardize on, say,
> 1-D array with lower bound 1 and upper bound 0?
It was pointed out to me today that a zero-dimensional matrix is a
scalar. This makes a bit of sense, if you say that
'{{56}}' is of type int[][], 2 dimensions
'{56}' is of type int[], 1 dimension
'56' is of type int, 0 dimensions
Notice that the number of brace pairs in the literal matches the number
of bracket pairs in the type declaration.
By that logic, '{}' has one dimension. I think this also works best in
practice, for example with array concatenation.