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

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: bug or feature, || -operator and NULLs
Дата
Msg-id 1161173711.32342.24.camel@coppola.muc.ecircle.de
обсуждение исходный текст
Ответ на bug or feature, || -operator and NULLs  (Andreas Joseph Krogh <andreak@officenet.no>)
Ответы Re: bug or feature, || -operator and NULLs  (Andreas Joseph Krogh <andreak@officenet.no>)
Список pgsql-hackers
> 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...

Why would it be more logical ?

NULL means "value not known".

Concatenate "value not known" with 'fisk' -> what's the logical answer?

I would say the logical result is 'value not known'... if one of the
components is not known, how can you know what is the result ?

Cheers,
Csaba.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: bug or feature, || -operator and NULLs
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Asynchronous I/O Support