Different behaviour of concate() and concate operator ||

Поиск
Список
Период
Сортировка
От amul sul
Тема Different behaviour of concate() and concate operator ||
Дата
Msg-id 1398689348.33839.YahooMailNeo@web193503.mail.sg3.yahoo.com
обсуждение исходный текст
Ответы Re: Different behaviour of concate() and concate operator ||  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi ALL,

I need little help to understand, text concatenation.

concat function and operator || have different behaviour, if any input is NULL.

test=# select  'abc' || NULL;
 ?column?
----------

(1 row)

test=# select concat('abc', NULL);
 concat
--------
 abc
(1 row)


It has simple reason, concat operator || use textcat() function which is STRICT.

my question is 

1. Do we required textcat to be STRICT, why?
2. textcat() is used for concat operator ||, can't it possible using concat() function?


Thanks in advance.

Regards,
Amul Sul  



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Decrease MAX_BACKENDS to 2^16
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: includedir_internal headers are not self-contained