Re: Different behaviour of concate() and concate operator ||

From: amul sul <sul_amul(at)yahoo(dot)co(dot)in>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <stark(at)mit(dot)edu>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Different behaviour of concate() and concate operator ||
Date: 2014-04-29 05:47:46
Message-ID: 1398750466.36734.YahooMailNeo@web193501.mail.sg3.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Monday, 28 April 2014 10:56 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

Greg Stark <stark(at)mit(dot)edu> writes:

>So they pretty much would have to make concat() treat NULL as empty.

could it be problematic if I update pg_operator catalogue entry for ||, 
call to concat() function instead of texcat(), in my production environment ? 

for eg.
 oprname | oprleft | oprright | oprresult | oprcode
---------+---------+----------+-----------+---------
 ||      |    25   |   25     |     25    | concat
(1 row)

result would be 

test=# select 'abc' || NULL; ;
 ?column?
----------
 abc
(1 row)

Thank for your help.

Regards,
Amul Sul

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip kumar 2014-04-29 05:49:30 Re: Proposal for Merge Join for Non '=' Operators
Previous Message Sergey Muraviov 2014-04-29 04:07:15 Re: Problem with displaying "wide" tables in psql