From: Daniel Kalchev <daniel@digsys.bg>
To: pgsql-sql@postgresql.org
Subject: except on nulls?
Date: Fri, 27 Oct 2000 09:02:43 +0300
Message-ID: <200010270602.JAA16927@dcave.digsys.bg> (raw)
I had the following weird experience. Hopefuly iy's my ignorance on the matter
(but I sort of think this worked before...)
On PostgreSQL 7.0.2, I have an database with two tables, holding different
versions of the data set (some rows missing in one of the tables). Example is:
CREATE TABLE "test1" (
"f1" text,
"f2" date,
"f3" "_text",
"f4" int4,
"f5" character varying(16)
);
Then table test2 with the same definition.
SELECT f1 FROM test2 EXCEPT SELECT f1 from test1;
produced empty result, although test2 contained few more rows.
Closer examination showed that both tables contained an 'null' row, with all
fields null.
After removing both rows, the query would return the proper results.
Another query,
SELECT * from test2 EXCEPT SELECT * from test1;
failed too, giving the following error:
ERROR: Unable to identify an operator '<>' for types '_text' and '_text'
You will have to retype this query using an explicit cast
Any idea why this is happening?
Daniel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: daniel@digsys.bg
Subject: Re: except on nulls?
In-Reply-To: <200010270602.JAA16927@dcave.digsys.bg>
References: <200010270602.JAA16927@dcave.digsys.bg>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox