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

From: Lukas Kahwe Smith <smith(at)pooteeweet(dot)org>
To: Andreas Joseph Krogh <andreak(at)officenet(dot)no>
Subject: Re: bug or feature, || -operator and NULLs
Date: 2006-10-18 13:11:47
Message-ID: 45362813.8070809@pooteeweet.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andreas Joseph Krogh wrote:

> If aggregates ignore NULL one could argue that so shuld the ||-operator?

I agree that this behaviour may seem pedantic, but changing this is only
going to lead to a huge wtf? factor. The baviour for NULL in aggregates
is pretty well documented and known. Even MySQL returns NULL in this
case, and they are known todo all sorts of changes for better "ease of use".

If you want this behaviour you will have to explicitly handle it with
COALESCE().

regards,
Lukas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-10-18 13:13:30 Re: bug or feature, || -operator and NULLs
Previous Message Alvaro Herrera 2006-10-18 13:11:32 Re: bug or feature, || -operator and NULLs