Re: bug in the concatenation of the selection...

Lists: pgsql-bugs
From: Andres Cuevas <andcuevas(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: bug in the concatenation of the selection...
Date: 2003-06-06 21:00:47
Message-ID: 20030606210047.74983.qmail@web10401.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

CREATE TABLE foo ("key" int4 NOT NULL, "data1"
varchar(20), "data2" varchar(20));

INSERT INTO foo VALUES ('1','zzz');

SELECT * FROM foo ;
key | data1 | data2
-----+-------+-------
1 | zzz |
(1 row)

SELECT key || '|' || data1 || '|' || data2 FROM foo;
?column?
----------

(1 row)

If data1 or data2 are NULL the request is NULL

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


From: Joe Conway <mail(at)joeconway(dot)com>
To: Andres Cuevas <andcuevas(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: bug in the concatenation of the selection...
Date: 2003-06-08 22:28:43
Message-ID: 3EE3B89B.7060904@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Andres Cuevas wrote:
> If data1 or data2 are NULL the request is NULL
>

Which is the correct behavior, not a bug. See:

http://techdocs.postgresql.org/guides/BriefGuideToNulls

HTH,

Joe