Skip site navigation (1) Skip section navigation (2)

Re: array_to_string

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Huxton <dev(at)archonet(dot)com>
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 15:35:44
Message-ID: 21430.1175009744@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-sql
Richard Huxton <dev(at)archonet(dot)com> writes:
> 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.

If the whole array is NULL it would return NULL, but that seems
unhelpful for a single element being NULL ...

			regards, tom lane

In response to

Responses

pgsql-sql by date

Next:From: Richard HuxtonDate: 2007-03-27 15:45:01
Subject: Re: array_to_string
Previous:From: Richard HuxtonDate: 2007-03-27 14:59:19
Subject: Re: array_to_string

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group