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

Поиск
Список
Период
Сортировка
От Lukas Kahwe Smith
Тема Re: bug or feature, || -operator and NULLs
Дата
Msg-id 45362813.8070809@pooteeweet.org
обсуждение исходный текст
Ответ на Re: bug or feature, || -operator and NULLs  (Andreas Joseph Krogh <andreak@officenet.no>)
Ответы Re: bug or feature, || -operator and NULLs  ("Mario Weilguni" <mario.weilguni@icomedias.com>)
Список 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 по дате отправления:

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: bug or feature, || -operator and NULLs
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: bug or feature, || -operator and NULLs