concenation of strings and null values - Mailing list pgsql-general

From Tino Wildenhain
Subject concenation of strings and null values
Date
Msg-id 3F827C11.3080209@wildenhain.de
Whole thread Raw
Responses Re: concenation of strings and null values  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Re: concenation of strings and null values  ("Dieter Fischer (grid-it)" <dieter.fischer@grid-it.ch>)
List pgsql-general
Hi,

SELECT 'abc'::text || 'def'::text;

returns 'abcdef' as we know.

SELECT 'abc'::text || ''::text;

returns 'abc'

SELECT 'abc'::text || null::text;

returns null

The last example looks like a bug,
but if it is intentionally so, its
at least very annoying and inconvenient.

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?

Regards
Tino Wildenhain


pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: COPY COMMAND
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: concenation of strings and null values