Re: what is good solution for support NULL inside string_to_array function?

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Josh Berkus <josh@agliodbs.com>, Pavel Stehule <pavel.stehule@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2010-05-04T03:18:32Z
Lists: pgsql-hackers

Tom Lane wrote:
>> Default display for NULL should be a zero-length string.
>>     
>
> That's just as broken as Pavel's suggestion.  Unless you have something
> that is guaranteed distingishable from the output of any non-null value,
> you really can't make a significant improvement here.
>
> 			
>   

Right. This is the problem we solved in CSV processing by distinguishing 
between quoted and unquoted values that could be null - the CSV rule is 
that a null value isn't quoted.

cheers

andrew