Re: concenation of strings and null values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tino Wildenhain <tino(at)wildenhain(dot)de>
Cc: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>, Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: concenation of strings and null values
Date: 2003-10-07 10:28:43
Message-ID: 23091.1065522523@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tino Wildenhain <tino(at)wildenhain(dot)de> writes:
> Can someone enlighten me if this is
> in accordance to some not so transparent
> rules of SQL92 or '99 and if so, how
> to work around this?

It is per spec: in SQL92 6.13 <string value expression>:

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

Case:

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-general by date

  From Date Subject
Next Message Nagib Abi Fadel 2003-10-07 10:38:32 Problems defining a primary key !!
Previous Message Peter Eisentraut 2003-10-07 10:17:26 Re: using copy to load odd characters