Re: array_to_string

From: Richard Huxton <dev(at)archonet(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sabin Coanda <sabin(dot)coanda(at)deuromedia(dot)ro>, pgsql-sql(at)postgresql(dot)org
Subject: Re: array_to_string
Date: 2007-03-27 14:59:19
Message-ID: 46093147.6000209@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tom Lane wrote:
> "Sabin Coanda" <sabin(dot)coanda(at)deuromedia(dot)ro> writes:
>> I used the function array_to_string, and I found it ignores NULL values,
>> e.g. array_to_string( 'ARRAY[1,NULL,3]', ',' ) returns '1,3'.
>
> Do you have a better idea?

If you're being strict it should presumably return NULL for the whole
string. Or you'd need a "coalesce-to-this" parameter.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2007-03-27 15:35:44 Re: array_to_string
Previous Message Tom Lane 2007-03-27 14:49:50 Re: array_to_string