From: | justin <justin(at)emproshunts(dot)com> |
---|---|
To: | Greg Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: string_to_array with empty input |
Date: | 2009-03-31 18:19:56 |
Message-ID: | 49D25ECC.7080305@emproshunts.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font color="#ff0000">This thread being cross posted has made it a bit
confusing </font><br>
<br>
Greg Stark wrote:
<blockquote
cite="mid:4136ffa0903311053x6f80e0bbl384167a71005aece(at)mail(dot)gmail(dot)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 for keeping 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 that don't make sense. Then the argument begins what values make since to drop. Just zero length strings or include strings with million white spaces???</font></big></big></font></small>
</pre>
<blockquote
cite="mid:4136ffa0903311053x6f80e0bbl384167a71005aece(at)mail(dot)gmail(dot)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(at)mail(dot)gmail(dot)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'm still confused which one you want here</font><br>
</body>
</html>
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/html | 2.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-03-31 19:27:38 | Re: [GENERAL] pgstattuple triggered checkpoint failure and database outage? |
Previous Message | Greg Stark | 2009-03-31 17:53:33 | Re: string_to_array with empty input |
From | Date | Subject | |
---|---|---|---|
Next Message | Euler Taveira de Oliveira | 2009-03-31 19:02:27 | Re: can't load plpython |
Previous Message | Greg Stark | 2009-03-31 17:53:33 | Re: string_to_array with empty input |