Re: [HACKERS] string_to_array with empty input

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] string_to_array with empty input
Дата
Msg-id 603c8f070904021301paa7d20are16b5e5719644b61@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] string_to_array with empty input  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] string_to_array with empty input  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
On Thu, Apr 2, 2009 at 2:50 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Thu, Apr 2, 2009 at 2:18 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> If there's a camp that actually *wants* a NULL result for this case,
>>> I missed the reasoning.
>
>> So that we don't break existing apps because of an issue that is
>> trivial to work around.
>
> We would only be breaking them if a NULL result were actually the
> correct behavior for the application's requirements, which seems
> a bit unlikely.

But that's completely untrue.  If the most useful behavior is either
ARRAY[''] or ARRAY[], then there are presumably lots and lots of
people out there who have apps that do COALESCE(string_to_array(...),
something).  Whichever way you change string_to_array() will break all
of the people doing this who wanted the opposite behavior for no good
reason.

...Robert

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

Предыдущее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: Re: reducing IO and memory usage: sending the content of a table to multiple files
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Postgresql installation with ssh connection.