Re: string || NULL ambiguity

From: Neil Conway <neilc(at)samurai(dot)com>
To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: string || NULL ambiguity
Date: 2003-03-20 03:08:57
Message-ID: 1048129737.19797.562.camel@tokyo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2003-03-20 03:09:25 Re: A bad behavior under autocommit off mode
Previous Message Hiroshi Inoue 2003-03-20 03:08:00 Re: Nested transactions: low level stuff