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

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Дата
Msg-id CADxJZo1rZcJYkVSw=8kDgCO0H_kVJtV9iibg6g-zPt0rWnpoHw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2 April 2013 10:59, Robert Haas <robertmhaas@gmail.com> wrote:
> On Mon, Apr 1, 2013 at 6:40 PM, Brendan Jurd <direvus@gmail.com> wrote:
>> It is not possible to construct e.g. '[3:2]={}' or '{{}, {}}' in
>> existing applications, so there is no way for that idiom in existing
>> applications to be broken by upgrading.  If testing for equality with
>> '{}' works now, it will also work post-upgrade.
>
> Sure, they've probably got to have at least
> some kind of application change before the wheels really start to come
> off, but as soon as some array that's empty but not equal to {} creeps
> into their application by whatever means, they've got trouble.

Constructing an array with nondefault bounds isn't happening by
accident, you'd have to know about, and deliberately make use of, the
obscure '[m:n]={}' syntax for array literals.  How is it going to
"creep in"?

I note the total absence of people rending their garments over the
fact that '{foo}' does not equal '[2:2]={foo}'.

Cheers,
BJ



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Следующее
От: Brendan Jurd
Дата:
Сообщение: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)