From: | sszabo(at)bigpanda(dot)com |
---|---|
To: | Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] empty concatenate |
Date: | 1999-12-23 16:58:13 |
Message-ID: | 199912231658.LAA26868@blargh.bigpanda.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
>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.
I believe this is a known issue that's being looked at right now.
However, in this case PostgreSQL seems to be correct.
2) If <concatenation> is specified, then let S1 and S2 be the re-
sult of the <character value expression> and <character factor>,
respectively.
Case:
a) If either S1 or S2 is the null value, then the result of the
<concatenation> is the null value.
>How can user write / use function which response on NULL (as IFNULL())?
Well, for now, you probably want to use coalesce around any input that
might be null. I believe coalesce returns the first non-null parameter,
so coalesce(<column>, '') will return either the column's value (if not
NULL) or the empty string which can then be used for concatenation.
Stephan
From | Date | Subject | |
---|---|---|---|
Next Message | Karel Zak - Zakkr | 1999-12-23 17:01:33 | Re: [HACKERS] empty concatenate |
Previous Message | Jose Soares | 1999-12-23 16:38:34 | Re: [HACKERS] empty concatenate |