On 2013.06.12 10:11 AM, Josh Berkus wrote:
Multidim arrays are why we can't have nice things.

Yeah, I think that was not our best moment.  :-(

Actually, if you think about it, we've never had "arrays" in PostgreSQL
... we have always had matrixes.  If you think about things that way,
most of the current functionality makes sense.

If the type system were changed so that arrays were were always just one-dimensional, you can define your matrix simply as a binary relation type whose primary key attribute has the type of a fixed-length array of integers, where the number of elements in the array is the number of dimensions in the matrix, and the array elements themselves defined the coordinates in the matrix. This design confers a number of benefits. Also, the case of the zero-dimension matrix needs no special treatment; the key array has zero elements. Would that not work? -- Darren Duncan



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to