| От | 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
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера