From: | "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at> |
---|---|
To: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: bug or feature, || -operator and NULLs |
Date: | 2006-10-23 08:00:23 |
Message-ID: | 52EF20B2E3209443BC37736D00C3C1380B091813@EXADV1.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Mario Weilguni wrote:
>> 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?
Unfortunately not, in Oracle's current version (10.2.0.2.0)
it is still that way.
I think that this Oracle 'feature' is almost as terrible as the
fact that they treat '' as NULL, which is (as has been pointed
out) most likely the reason for treating NULL as '' in ||.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Stark | 2006-10-23 09:22:32 | Re: New CRC algorithm: Slicing by 8 |
Previous Message | Zeugswetter Andreas ADI SD | 2006-10-23 07:59:30 | Re: [SPAM?] Re: Asynchronous I/O Support |