Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL) - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Date
Msg-id 0E8CD7AE-6C56-4E19-912E-42BCF1F1B731@kineticode.com
Whole thread Raw
In response to Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
List pgsql-hackers
On Apr 1, 2013, at 4:59 PM, Robert Haas <robertmhaas@gmail.com> wrote:

> I think the only people for whom nothing will break are the people who
> aren't using arrays in the first place.  Anyone who is is likely to
> have dependencies on the way array_lower/upper work today.

Well, what if we add new functions that return 0 for empty arrays, but leave the existing ones alone? Perhaps call them
array_size(),array_first_index(), and array_last_index(). Then nothing has to break, and we can decide independently if
wewant to deprecate the older functions in a future release. Or not. 

Best,

David




pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Next
From: Brendan Jurd
Date:
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)