Re: [HACKERS] empty concatenate

Поиск
Список
Период
Сортировка
От sszabo@bigpanda.com
Тема Re: [HACKERS] empty concatenate
Дата
Msg-id 199912231658.LAA26868@blargh.bigpanda.org
обсуждение исходный текст
Ответ на Re: [HACKERS] empty concatenate  (Karel Zak - Zakkr <zakkr@zf.jcu.cz>)
Ответы Re: [HACKERS] empty concatenate  (Karel Zak - Zakkr <zakkr@zf.jcu.cz>)
Re: [HACKERS] empty concatenate  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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
<characterfactor>,respectively.Case:a) If either S1 or S2 is the null value, then the result of the <concatenation> is
thenull 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jose Soares
Дата:
Сообщение: Re: [HACKERS] empty concatenate
Следующее
От: Karel Zak - Zakkr
Дата:
Сообщение: Re: [HACKERS] empty concatenate