pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Huxton <dev@archonet.com>
Cc: Sabin Coanda <sabin.coanda@deuromedia.ro>
Cc: pgsql-sql@postgresql.org
Subject: Re: array_to_string
Date: Tue, 27 Mar 2007 11:35:44 -0400
Message-ID: <21430.1175009744@sss.pgh.pa.us> (raw)
In-Reply-To: <46093147.6000209@archonet.com>
References: <euaelf$28f8$1@news.hub.org>
	<20090.1175006990@sss.pgh.pa.us>
	<46093147.6000209@archonet.com>

Richard Huxton <dev@archonet.com> writes:
> Tom Lane wrote:
>> "Sabin Coanda" <sabin.coanda@deuromedia.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



view thread (6+ messages)  latest in thread

Message-ID: <21430.1175009744@sss.pgh.pa.us>
Permalink:  ../21430.1175009744@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21430.1175009744@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dev@archonet.com, sabin.coanda@deuromedia.ro
  Subject: Re: array_to_string
  In-Reply-To: <21430.1175009744@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox