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

From Lukas Kahwe Smith
Subject Re: bug or feature, || -operator and NULLs
Date
Msg-id 45362813.8070809@pooteeweet.org
Whole thread Raw
In response to Re: bug or feature, || -operator and NULLs  (Andreas Joseph Krogh <andreak@officenet.no>)
Responses Re: bug or feature, || -operator and NULLs  ("Mario Weilguni" <mario.weilguni@icomedias.com>)
List 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



pgsql-hackers by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: Re: bug or feature, || -operator and NULLs
Next
From: Alvaro Herrera
Date:
Subject: Re: bug or feature, || -operator and NULLs