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

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Brendan Jurd <direvus(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Date: 2013-04-02 00:34:43
Message-ID: 0E8CD7AE-6C56-4E19-912E-42BCF1F1B731@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Apr 1, 2013, at 4:59 PM, Robert Haas <robertmhaas(at)gmail(dot)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 we want to deprecate the older functions in a future release. Or not.

Best,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2013-04-02 00:57:12 Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Previous Message Robert Haas 2013-04-01 23:59:38 Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)