Re: [HACKERS] string_to_array with empty input

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] string_to_array with empty input
Дата
Msg-id 7668.1238605778@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] string_to_array with empty input  ("David E. Wheeler" <david@kineticode.com>)
Ответы Re: [HACKERS] string_to_array with empty input  ("David E. Wheeler" <david@kineticode.com>)
Список pgsql-general
"David E. Wheeler" <david@kineticode.com> writes:
> Well, I'd just point out that the return value of string_to_array() is
> text[].

True...

> Thus, this is not a problem with string_to_array(), but a
> casting problem from text[] to int[].

Nonsense.  The question is whether string_to_array is meant to be useful
for lists of anything except text.  I agree you could argue that it
isn't.  But even in the domain of text it's not all that cut-and-dried
whether string_to_array should return array[] or array[''] for empty
input.  So ISTM we're giving up less than we gain by choosing the former.

            regards, tom lane

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: [GENERAL] Re: [GENERAL] ERROR: XX001: could not read block 2354 of relation…
Следующее
От: Patrick Desjardins
Дата:
Сообщение: Re: [GENERAL] Re: [GENERAL] ERROR: XX001: could not read block 2354 of relation…