Re: string || NULL ambiguity - Mailing list pgsql-hackers

From Neil Conway
Subject Re: string || NULL ambiguity
Date
Msg-id 1048129737.19797.562.camel@tokyo
Whole thread Raw
In response to Re: string || NULL ambiguity  (Oleg Bartunov <oleg@sai.msu.su>)
Responses Re: string || NULL ambiguity  ("Thomas T. Thai" <tom@minnesota.com>)
List 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



pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: A bad behavior under autocommit off mode
Next
From: Hiroshi Inoue
Date:
Subject: Re: cursors outside transactions