Re: [HACKERS] empty concatenate
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] empty concatenate |
Дата | |
Msg-id | 199912231556.KAA05091@candle.pha.pa.us обсуждение исходный текст |
Ответ на | empty concatenate (Karel Zak - Zakkr <zakkr@zf.jcu.cz>) |
Ответы |
Re: [HACKERS] empty concatenate
|
Список | pgsql-hackers |
> > Hi, > > I try concatenate text via standard '||' oprerator, but result is > interesting: > > PgSQL 6.5.3/7.0: > ~~~~~~~~~~~~~~~ > test=> select * from x; > a |b > ---+--- > AAA|BBB > xxx| > (2 rows) > > test=> select a || b from x; > ?column? > -------- > AAABBB > <-------------- empty ! > (2 rows) NULL's can not be concatenated, but '' can. Looks fine to me: --------------------------------------------------------------------------- test=> create table ff (x text, y text);insCREATEtest=> insert into ff values ('a','');INSERT 19082 1test=> insert into ffvalues ('b',null);INSERT 19083 1test=> select x || y from ff; ?column? ---------- a (2 rows) -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: