Re: array_to_string bug? - Mailing list pgsql-hackers

From Steve Crawford
Subject Re: array_to_string bug?
Date
Msg-id 4AFC53C1.5050009@pinpointresearch.com
Whole thread Raw
In response to Re: array_to_string bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: array_to_string bug?
List pgsql-hackers
Tom Lane wrote: <blockquote cite="mid:4234.1258042826@sss.pgh.pa.us" type="cite"><pre wrap="">David Fetter <a
class="moz-txt-link-rfc2396E"href="mailto:david@fetter.org"><david@fetter.org></a> writes: </pre><blockquote
type="cite"><prewrap="">The next one is just plain unexpected.   </pre></blockquote><pre wrap="">
 
array_to_string ignores null elements.  What do you think it should do
with them?
        regards, tom lane
 </pre></blockquote> This seems somewhat related to the long-running discussion from back in February-April regarding
string_to_arraywith empty input which faded away somewhere around here: <a class="moz-txt-link-freetext"
href="http://archives.postgresql.org/pgsql-hackers/2009-04/msg00363.php">http://archives.postgresql.org/pgsql-hackers/2009-04/msg00363.php</a>.
Atthe time the decision was to defer any decision to after 8.4.<br /><br /> Perhaps there is a solution which can
addressboth cases - ideally one which would, to the extent practical, allow string_to_array to be the inverse of
array_to_string.This could be particularly useful when dealing with clients that don't know how to directly deal with
PostgreSQLarrays but which can generally easily deal with strings.<br /><br /> Although it might cause a fair amount of
backward-compatibilitytrouble, the string representation could either use NULL to represent a null element as is
allowedin other contexts or require that empty-string elements be represented as "" to differentiate ,"", (empty-string
element)from ,, (null element).<br /><br /> Cheers,<br /> Steve<br /><br /> 

pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Patch committers
Next
From: Josh Berkus
Date:
Subject: Re: next CommitFest