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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: amul sul <sul_amul(at)yahoo(dot)co(dot)in>
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-28 13:46:28
Message-ID: 9231.1398692788@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

amul sul <sul_amul(at)yahoo(dot)co(dot)in> writes:
> concat function and operator || have different behaviour, if any input is NULL.

The behavior of || is specified by the SQL standard, and it says (SQL99
6.27 <string value expression> general rule 2a):

a) If either S1 or S2 is the null value, then the result of the
<concatenation> is the null value.

So no, we're not changing it to be more like concat().

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-04-28 13:47:09 Re: pgsql: Can't completely get rid of #ifndef FRONTEND in palloc.h :-(
Previous Message Robert Haas 2014-04-28 13:36:03 Re: shm_mq inconsistent behavior of SHM_MQ_DETACHED