Re: bug or feature, || -operator and NULLs

From: Mario Weilguni <mweilguni(at)sime(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Andreas Joseph Krogh <andreak(at)officenet(dot)no>
Subject: Re: bug or feature, || -operator and NULLs
Date: 2006-10-18 12:44:49
Message-ID: 200610181444.49104.mweilguni@sime.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Am Mittwoch, 18. Oktober 2006 13:52 schrieb Andreas Joseph Krogh:
> 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...

I've worked alot with oracle a few years ago and I agree, the feature is handy
and makes sometimes life easier, but it's simply wrong. I heard a while ago
that newer oracle versions changed this to sql - standard, is this true?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paesold 2006-10-18 12:48:02 Re: Mirror problems for download
Previous Message Martijn van Oosterhout 2006-10-18 12:43:41 Re: +1400 is a valid time zone offset