Re: what is good solution for support NULL inside string_to_array function?

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: what is good solution for support NULL inside string_to_array function?
Дата
Msg-id x2w162867791005040453tc5c7ef5z9fd5711ffe457457@mail.gmail.com
обсуждение исходный текст
Ответ на Re: what is good solution for support NULL inside string_to_array function?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
2010/5/4 Josh Berkus <josh@agliodbs.com>:
>
>> quietly removing NULL is maybe good for compatibility but is wrong for
>> functionality.
>
> I agree.  I wasn't aware of this little misfeature.
>
> Default display for NULL should be a zero-length string.
>

I disagree - NULL is NULL, not empty string (Oracle is different)

if array_to_string is equivalent to

x[1] || sep || x[2] || sep || x[3] || sep ....

then correct result is NULL

and then string_to_array and array_to_string are correct, because
string_to_array cannot contain any NULL symbol.

Regards
Pavel Stehule



> --
>                                  -- Josh Berkus
>                                     PostgreSQL Experts Inc.
>                                     http://www.pgexperts.com
>


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

Предыдущее
От: Srinivas Naik
Дата:
Сообщение: Re: Reg: SQL Query for Postgres 8.4.3
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: max_standby_delay considered harmful