Re: [HACKERS] empty concatenate - Mailing list pgsql-hackers

From Karel Zak - Zakkr
Subject Re: [HACKERS] empty concatenate
Date
Msg-id Pine.LNX.3.96.991223164928.25235B-100000@ara.zf.jcu.cz
Whole thread Raw
In response to Re: [HACKERS] empty concatenate  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [HACKERS] empty concatenate
List pgsql-hackers
> 
> NULL's can not be concatenated, but '' can.  Looks fine to me:
> 
> ---------------------------------------------------------------------------
> 
>     test=> create table ff (x text, y text);
>     insCREATE
>     test=> insert into ff values ('a','');
>     INSERT 19082 1
>     test=> insert into ff values ('b',null);
>     INSERT 19083 1
>     test=> select x || y from ff;
>      ?column? 
>     ----------
>      a
>      
>     (2 rows)


Well, but why PgSQL ignore function result if any argument is NULL. IMHO is
function's problem what return, and PgSQL must use this result. 

How can user write / use function which response on NULL (as IFNULL())?
                        Karel



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] empty concatenate
Next
From: rjb@typeline.com (Robert Badaracco)
Date:
Subject: libpg and remote access