bug or feature, || -operator and NULLs - Mailing list pgsql-hackers

From Andreas Joseph Krogh
Subject bug or feature, || -operator and NULLs
Date
Msg-id 200610181352.46620.andreak@officenet.no
Whole thread Raw
Responses Re: bug or feature, || -operator and NULLs  (Csaba Nagy <nagy@ecircle-ag.com>)
Re: bug or feature, || -operator and NULLs  (Mario Weilguni <mweilguni@sime.com>)
Re: bug or feature, || -operator and NULLs  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
This has been been discussed before, but Oracle behaves differently, and IMHO
in a more correct way.

The following query returns NULL in PG:
SELECT NULL || 'fisk';

But in Oracle, it returns 'fisk':
SELECT NULL || 'fisk' FROM DUAL;

The latter seems more logical...

--
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / Manager
gpg public_key: http://dev.officenet.no/~andreak/public_key.asc
------------------------+---------------------------------------------+
OfficeNet AS            | The most difficult thing in the world is to |
Karenslyst Allé 11      | know how to do a thing and to watch         |
PO. Box 529 Skøyen      | somebody else doing it wrong, without       |
0214 Oslo               | comment.                                    |
NORWAY                  |                                             |
Mobile: +47 909  56 963 |                                             |
------------------------+---------------------------------------------+


pgsql-hackers by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: [GENERAL] query log corrupted-looking entries
Next
From: Csaba Nagy
Date:
Subject: Re: bug or feature, || -operator and NULLs