| От | Tom Lane |
|---|---|
| Тема | string_to_array with an empty input string |
| Дата | |
| Msg-id | 7384.1281465714@sss.pgh.pa.us обсуждение |
| Ответы |
Re: string_to_array with an empty input string
|
| Список | pgsql-hackers |
Looking through Pavel's string_to_array patch, I notice that the new
version of string_to_array returns an empty (zero-element) array when
the input string is of zero length, whereas the traditional version
returned NULL instead. The patch fails to emulate the old behavior
exactly, but rather than fix it, I wonder if we shouldn't make the two
versions behave the same. (If we don't have them doing the same thing,
we're going to have to document the difference...) The NULL result
seems a bit peculiar to me, and the empty-array result saner. Given
the general inconsistency surrounding empty arrays elsewhere, I think
this wouldn't be a very problematic change for most users.
Thoughts?
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера