Robert Haas <[email protected]> writes:
> On Thu, Nov 12, 2009 at 1:28 PM, Steve Crawford
> <[email protected]> wrote:
>> Although it might cause a fair amount of backward-compatibility trouble, the
>> string representation could either use NULL to represent a null element as
>> is allowed in other contexts or require that empty-string elements be
>> represented as "" to differentiate ,"", (empty-string element) from ,, (null
>> element).
> That would cause a substantial amount of grief to people who might not
> want that behavior, though. I use these functions for creating
> human-readable output, not for serialization. Simple, predictable
> behavior is very important.
I agree --- we don't want to start introducing quoting rules into
array_to_string. I think the viable alternatives are the current
behavior, or treating a NULL element as if it were an empty string.
David's idea that the entire output should go to NULL might be sane
from a strict semantics point of view, but it also seems to make the
function just about entirely useless in practice.
regards, tom lane
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers