On 06/14/2012 03:54 PM, Ken Tanzer wrote:
Thanks Steve. FWIW I looked at the 9.0 and 9.1 release notes, and
didn't find much on arrays in them.
The notes are terse (a 1-2 line comment encapsulates the results of
hundreds of messages covering a couple year) but there are many
references to updates in how arrays are handled.
I do have one follow-up curiosity question, though. Why does
array_dims(array[]::varchar[]) return NULL instead of 0? I would
expect NULL for a NULL array, but not an empty one. (And the same for
array_[upper,lower,length] functions as well.
I can't answer, specifically. But it makes a certain amount of sense. An
empty array has no elements so where does it "begin" or "end" -
especially since PostgreSQL array indexes don't need to start at 1 and
the array could be multi-dimensional. Unknown, aka null, seems the best
response.
Cheers,
Steve
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general