Re: [GENERAL] string_to_array with empty input

Поиск
Список
Период
Сортировка
От justin
Тема Re: [GENERAL] string_to_array with empty input
Дата
Msg-id 49D240A7.1010009@emproshunts.com
обсуждение исходный текст
Ответ на Re: [GENERAL] string_to_array with empty input  (Sam Mason <sam@samason.me.uk>)
Список pgsql-hackers
Sam Mason wrote:
> I'd expect 3,2,1 and 1.
>
> That's also a disingenuous example; what would you expect back from:
>
>   select count_elements(string_to_array('butter,,milk',','))
>
> I think the semantics you want is what you'd get from:
>
>   array_filter_blanks(string_to_array($1,$2))
>
> where I defined "array_filter_blanks" in my previous post.
>

I agree the function should not be changing values passed.
Stripping/Dropping empty strings is changing what was passed into the
function instead breaking it into a array.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Solaris getopt_long and PostgreSQL
Следующее
От: justin
Дата:
Сообщение: Re: [GENERAL] string_to_array with empty input