From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: what is good solution for support NULL inside string_to_array function? |
Date: | 2010-05-04 05:36:19 |
Message-ID: | l2i162867791005032236ja26d30fcu2fb430d65e4c7d3c@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2010/5/4 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Josh Berkus <josh(at)agliodbs(dot)com> writes:
>>> 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.
>
> That's just as broken as Pavel's suggestion. Unless you have something
> that is guaranteed distingishable from the output of any non-null value,
> you really can't make a significant improvement here.
>
I wouldn't modify current two params string_to_array and
array_to_string function. So there are not any default string (maybe
empty string) for NULL. My proposal is new three params functions with
>>>explicit<<< "null string" definition. This cannot break
compatibility and enhance functionality - It is just short cut for
code from my proposal - in C this functionality can by implemented
much faster.
Regards
Pavel
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Srinivas Naik | 2010-05-04 06:47:37 | Reg: SQL Query for Postgres 8.4.3 |
Previous Message | Ioseph Kim | 2010-05-04 05:09:38 | Re: CP949 for EUC-KR? |