Re:

Поиск
Список
Период
Сортировка
От Alexander Litvinov
Тема Re:
Дата
Msg-id 200310011727.21502.lan@ac-sw.com
обсуждение исходный текст
Ответ на Re:  ("Daniel Schuchardt" <daniel_schuchardt@web.de>)
Список pgsql-general
> 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
Дата:
Сообщение: Re: Stored procedures with variable number of args ?
Следующее
От: "Daniel Schuchardt"
Дата:
Сообщение: Re: