| От | David E. Wheeler |
|---|---|
| Тема | Re: [HACKERS] string_to_array with empty input |
| Дата | |
| Msg-id | FAA0F11E-B5EB-4B25-BF2B-3C12C48FF883@kineticode.com обсуждение |
| Ответ на | Re: [HACKERS] string_to_array with empty input (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
On Apr 1, 2009, at 10:09 AM, Tom Lane wrote:
>> 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.
Yeah. I'm okay with either, as long as it's consistent. I have a mild
preference for '{""}', but I can live with ARRAY[] instead. As long as
it's not NULL that gets returned.
Best,
David
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера