Re: string || NULL ambiguity

Neil Conway <neilc@samurai.com>

From: Neil Conway <neilc@samurai.com>
To: Oleg Bartunov <oleg@sai.msu.su>
Cc: Alvaro Herrera <alvherre@dcc.uchile.cl>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2003-03-20T03:08:57Z
Lists: pgsql-hackers
On Wed, 2003-03-19 at 20:32, Oleg Bartunov wrote:
> On Wed, 19 Mar 2003, Alvaro Herrera wrote:
> > stringA||COALESCE(NULL, '')
> >
> 
> we don't know in advance if it's NULL or not.

Right, that's the point of COALESCE: the first non-NULL argument is
returned -- so if the first argument to COALESCE happens to be non-NULL,
COALESCE has no effect.

Cheers,

Neil