From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "David E(dot) Wheeler" <david(at)kineticode(dot)com>, justin <justin(at)emproshunts(dot)com>, Greg Stark <stark(at)enterprisedb(dot)com>, Sam Mason <sam(at)samason(dot)me(dot)uk>, pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] string_to_array with empty input |
Date: | 2009-04-02 20:01:29 |
Message-ID: | 603c8f070904021301paa7d20are16b5e5719644b61@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Thu, Apr 2, 2009 at 2:50 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Thu, Apr 2, 2009 at 2:18 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> If there's a camp that actually *wants* a NULL result for this case,
>>> I missed the reasoning.
>
>> So that we don't break existing apps because of an issue that is
>> trivial to work around.
>
> We would only be breaking them if a NULL result were actually the
> correct behavior for the application's requirements, which seems
> a bit unlikely.
But that's completely untrue. If the most useful behavior is either
ARRAY[''] or ARRAY[], then there are presumably lots and lots of
people out there who have apps that do COALESCE(string_to_array(...),
something). Whichever way you change string_to_array() will break all
of the people doing this who wanted the opposite behavior for no good
reason.
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2009-04-02 20:16:41 | Re: Postgresql installation with ssh connection. |
Previous Message | Ivan Sergio Borgonovo | 2009-04-02 19:48:33 | Re: reducing IO and memory usage: sending the content of a table to multiple files |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-04-02 20:05:29 | Re: Crash in gist insertion on pathological box data |
Previous Message | Andrew Gierth | 2009-04-02 19:58:37 | Re: Crash in gist insertion on pathological box data |