Received: from ural2.hszk.bme.hu (ural2.hszk.bme.hu [152.66.130.2]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8GEEV721684 for ; Sun, 16 Sep 2001 10:14:31 -0400 (EDT) (envelope-from kb136@hszk.bme.hu) Received: (from kb136@localhost) by ural2.hszk.bme.hu (8.11.3/8.11.3) id f8GEERS22124; Sun, 16 Sep 2001 16:14:27 +0200 (MEST) Date: Sun, 16 Sep 2001 16:14:27 +0200 (MEST) From: Kovacs Baldvin X-X-Sender: To: Subject: Intentional, or bug? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200109/89 X-Sequence-Number: 4753 Hi! I probably found an inconsistence of the working of the = operator. Please read ahead, if you're interested. I have two tables, let't call them a and b. They are: a) x | y ----------------------------- 1 | 100 2 | NULL b) y | z ----------------------------- 1 | 'hallelujah' NULL | 'hmm...' Now let's issue this query: select b.z from a,b where a.y=b.y; The answer is: 'hallelujah', but it omits 'hmm...'. Now let's issue the following: select NULL = NULL; The answer is: true!!! My question is why does it omit the rows with NULL at the first case? However, I have a real life problem, when not all data is given in a column, so I need a query to include the NULL=NULL rows. I can workaround it as defining a new operator, ~=, with the meaning "both null, or =". I did it, it works, but very slow. So, is it an intentinal way of functioning, or it is bug somewhere? Thanks, Baldvin