Re: Empty arrays vs. NULLs, 9.1 & 8.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
Cc: Steve Crawford <scrawford(at)pinpointresearch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Empty arrays vs. NULLs, 9.1 & 8.3
Date: 2012-06-15 16:29:31
Message-ID: 28900.1339777771@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ken Tanzer <ken(dot)tanzer(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Boussekey 2012-06-15 16:33:49 Re: Starting a cluster as a service
Previous Message Philipp Kraus 2012-06-15 15:18:25 full text index / search