Different behaviour of concate() and concate operator || - Mailing list pgsql-hackers

From amul sul
Subject Different behaviour of concate() and concate operator ||
Date
Msg-id 1398689348.33839.YahooMailNeo@web193503.mail.sg3.yahoo.com
Whole thread Raw
Responses Re: Different behaviour of concate() and concate operator ||  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Robert Haas
Date:
Subject: Re: Decrease MAX_BACKENDS to 2^16
Next
From: Heikki Linnakangas
Date:
Subject: Re: includedir_internal headers are not self-contained