Is this a feature ?

Поиск
Список
Период
Сортировка
От David BOURIAUD
Тема Is this a feature ?
Дата
Msg-id 200206041018.24328.david.bouriaud@ac-rouen.fr
обсуждение исходный текст
Ответы Re: Is this a feature ?  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
Re: Is this a feature ?  (Jan Wieck <janwieck@yahoo.com>)
Re: Is this a feature ?  ("Nick Fankhauser" <nickf@ontko.com>)
Re: Is this a feature ?  (Joel Burton <joel@joelburton.com>)
Re: Is this a feature ?  (James Orr <james@orrwhat.net>)
Список pgsql-sql
Hi the list !
I've read the docs, and found that you could concatenate two or more strings 
in one select statement like this :
selectciv || name || forname as identity
fromperson;

This just works fine and returns rows with only one column named identity.
So far, if one of the fields (civ, name or forname) is null, identity is 
null... That doesn't seems right, since it means that 1+2+0 = 0 !!!!
Has anybody else seen the same strange behaviour ? And is there a way to work 
this around ?
Please, don't answer me to use the function textcat (text, text), since it 
behaves the same and makes queries quite unreadeable...
eg.
select textcat ( textcat (civ, name), forname) as identity
from person;
is quite readeable, but when you add fields separator, it isn't.
-- 
David BOURIAUD
----------------------------------------------------------
In a world without walls or fences, what use do we have 
for windows or gates ?
----------------------------------------------------------
ICQ#102562021



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

Предыдущее
От: Achilleus Mantzios
Дата:
Сообщение: Re: Postgres Function Problem
Следующее
От: Achilleus Mantzios
Дата:
Сообщение: new itoar function