Re: <no subject>

Поиск
Список
Период
Сортировка
Искать
От
Alexander Litvinov
Тема
Re: <no subject>
Дата
Msg-id
200310011727.21502.lan@ac-sw.com
Ответ на
Re: <no subject> (Daniel Schuchardt)
Список
Дерево обсуждения
<no subject> "Daniel Schuchardt" <daniel_schuchardt@web.de>
Re: <no subject> Ron Johnson <ron.l.johnson@cox.net>
Re: <no subject> Richard Huxton <dev@archonet.com>
Re: <no subject> "Daniel Schuchardt" <daniel_schuchardt@web.de>
Re: <no subject> Oliver Elphick <olly@lfix.co.uk>
Re: <no subject> Alexander Litvinov <lan@ac-sw.com>
Re: <no subject> "Daniel Schuchardt" <daniel_schuchardt@web.de>
Re: <no subject> Oliver Elphick <olly@lfix.co.uk>
Re: <no subject> "Daniel Schuchardt" <daniel_schuchardt@web.de>
Re: <no subject> Richard Huxton <dev@archonet.com>
> But CAST(NULL AS VARCHAR) should make it a varchar so i should be able
> to || the both values. So perhaps a bug in CAST.
>
> The only way here would be to make a CASE WHEN - i think thats not a
> good behavoir.

NULL is null even it have varchar type, it is not an empty string. Try to do 
the following:

select field1 || case when field2 is null then '' else field2 end from 
my_big_table;
В списке pgsql-general по дате отправления
От: Peter Eisentraut
Дата:
От: Daniel Schuchardt
Дата:
Сообщение: Re: <no subject>
FAQ