Re: what is good solution for support NULL inside string_to_array function?
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-05-04T11:53:00Z
Lists: pgsql-hackers
2010/5/4 Josh Berkus <josh@agliodbs.com>: > >> quietly removing NULL is maybe good for compatibility but is wrong for >> functionality. > > I agree. I wasn't aware of this little misfeature. > > Default display for NULL should be a zero-length string. > I disagree - NULL is NULL, not empty string (Oracle is different) if array_to_string is equivalent to x[1] || sep || x[2] || sep || x[3] || sep .... then correct result is NULL and then string_to_array and array_to_string are correct, because string_to_array cannot contain any NULL symbol. Regards Pavel Stehule > -- > -- Josh Berkus > PostgreSQL Experts Inc. > http://www.pgexperts.com >