Re: concatenation with a null column (using ||) nulls the result?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Harkins <nharkins(at)well(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: concatenation with a null column (using ||) nulls the result?
Date: 2006-04-10 21:47:26
Message-ID: 921.1144705646@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Neil Harkins <nharkins(at)well(dot)com> writes:
> Is this standard SQL behavior?

Yes. SQL92 6.13 <string value expression>, general rule 2:

2) If <concatenation> is specified, then let S1 and S2 be the re-
sult of the <character value expression> and <character factor>,
respectively.

a) If either S1 or S2 is the null value, then the result of the
<concatenation> is the null value.

...

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Alvaro Herrera 2006-04-10 21:55:56 Re: concatenation with a null column (using ||) nulls the result?
Previous Message Neil Harkins 2006-04-10 21:36:47 concatenation with a null column (using ||) nulls the result?