Re: Empty arrays vs. NULLs, 9.1 & 8.3 - Mailing list pgsql-general

From Tom Lane
Subject Re: Empty arrays vs. NULLs, 9.1 & 8.3
Date
Msg-id 28900.1339777771@sss.pgh.pa.us
Whole thread Raw
In response to Re: Empty arrays vs. NULLs, 9.1 & 8.3  (Ken Tanzer <ken.tanzer@gmail.com>)
List pgsql-general
Ken Tanzer <ken.tanzer@gmail.com> writes:
> Thanks Steve.  FWIW I looked at the 9.0 and 9.1 release notes, and didn't
> find much on arrays in them.

This particular issue was fixed in 8.4.

> 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.

Yeah, there are still a lot of inconsistencies there :-(.  Eventually
I'd like to see somebody go through all the array operations and make
a proposal for consistent handling of empty arrays.  I think it would
be better if we changed all those things at once, rather than causing
piecemeal compatibility hits.

            regards, tom lane

pgsql-general by date:

Previous
From: Philipp Kraus
Date:
Subject: full text index / search
Next
From: Thomas Boussekey
Date:
Subject: Re: Starting a cluster as a service