Re: [GENERAL] string_to_array with empty input - Mailing list pgsql-hackers

From justin
Subject Re: [GENERAL] string_to_array with empty input
Date
Msg-id 49D25ECC.7080305@emproshunts.com
Whole thread Raw
In response to Re: [GENERAL] string_to_array with empty input  (Greg Stark <stark@enterprisedb.com>)
List pgsql-hackers
<font color="#ff0000">This thread being cross posted has made it a bit confusing </font><br /><br /> Greg Stark wrote:
<blockquotecite="mid:4136ffa0903311053x6f80e0bbl384167a71005aece@mail.gmail.com" type="cite"><pre wrap="">
 

Nobody has ever suggested filtering out empty elements or dealing
specially with spaces or anything else like that. If you're talking
about that then you've missed the original question. </pre></blockquote><br /><pre wrap="">"Does anyone want to argue
forkeeping it the same?  Or perhaps
 
argue that a <big><big><u><b>zero-element array</b></u></big></big> is a more sensible result than
a one-element array with one empty string?  (It doesn't seem
like it to me, but maybe somebody thinks so.)"


<small><font color="#ff0000"><big><big><font face="Arial">That means to me dropping empty strings or removing values
thatdon't make sense.  Then the argument begins what values make since to drop.  Just zero length strings or include
stringswith million white spaces???</font></big></big></font></small>
 

</pre><blockquote cite="mid:4136ffa0903311053x6f80e0bbl384167a71005aece@mail.gmail.com" type="cite"><pre wrap="">
One last try.

If there's a column called "shopping list" which is a comma-separated
list of items to buy in the store and I store '' in it. How many items
do you think that means you should go shopping for? Do you think
that's one item that should be rejected because it's an empty string?
Or do you think that's an empty list with zero items listed? </pre></blockquote><font color="#ff0000"><big>It can't be
rejected, Its an Empty shopping list  although a worthless shopping list .   </big></font><br /><blockquote
cite="mid:4136ffa0903311053x6f80e0bbl384167a71005aece@mail.gmail.com"type="cite"><pre wrap="">
 
What would it look like if it was a zero-length list? You can ask what
would it look like if it was a shopping list of one item called ''.
But I agree both are theoretically consistent, but one is actually
useful in 99% of use cases. The other is only useful in unusual cases. </pre></blockquote><br /><font
color="#ff0000">I'mstill confused which one you want here</font><br /> 

pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: [GENERAL] string_to_array with empty input
Next
From: Euler Taveira de Oliveira
Date:
Subject: Re: can't load plpython