Re: concat fails 'sometimes' on empty colums in select

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: concat fails 'sometimes' on empty colums in select
Дата
Msg-id 20041211195435.GE2668@wolff.to
обсуждение исходный текст
Ответ на concat fails 'sometimes' on empty colums in select  (Stefan de Konink <skinkie@xs4all.nl>)
Ответы Re: concat fails 'sometimes' on empty colums in select  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-bugs
On Sat, Dec 11, 2004 at 03:33:07 +0100,
  Stefan de Konink <skinkie@xs4all.nl> wrote:
> Hi,
>
> I have a table with some empty colums, if I try to concat my colums to
> eachother something strange happens. Rather empty column B produces
> virtually no output using the || in the select query. But the half filed
> colum A does give the desired output.

Empty strings and NULL values aren't the same thing. You probably either
want to store empty strings or use coalesce to change NULL to an empty
string before using concatenation, as a NULL concatenated with anything
results in NULL.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: is it bug
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: concat fails 'sometimes' on empty colums in select