Re: string_to_array, array_to_string function without separator

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: string_to_array, array_to_string function without separator
Дата
Msg-id fb7538d3-1154-e0a9-3a8a-a3334434ef76@anastigmatix.net
обсуждение исходный текст
Ответ на Re: string_to_array, array_to_string function without separator  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: string_to_array, array_to_string function without separator
Список pgsql-hackers
On 3/15/19 12:26 PM, Pavel Stehule wrote:
> you use string_to_array function without separator, then only one possible
> semantic is there - separation by chars.

Other languages can and do specify other semantics for the
separator-omitted case: often (as in Python) it means to split
around "runs of one or more characters the platform considers white
space", as a convenience, given that it's a fairly commonly wanted
meaning but can be tedious to spell out as an explicit separator.

I admit I think a separator of '' would be more clear than null,
so if I were designing string_to_array in a green field, I think
I would swap the meanings of null and '' as the delimiter: null
would mean "don't really split anything", and '' would mean "split
everywhere you can find '' in the string", that is, everywhere.

But the current behavior is already established....

Regards,
-Chap


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: string_to_array, array_to_string function without separator