Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5GGLTa88103 for ; Sat, 16 Jun 2001 12:21:29 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f5GGLG328072; Sat, 16 Jun 2001 12:21:16 -0400 (EDT) To: john@august.com cc: pgsql-sql@postgresql.org Subject: Re: not null - trivial, unexpected behavior In-reply-to: <20010616151611.40654.qmail@web10006.mail.yahoo.com> References: <20010616151611.40654.qmail@web10006.mail.yahoo.com> Comments: In-reply-to John Scott message dated "Sat, 16 Jun 2001 08:16:11 -0700" Date: Sat, 16 Jun 2001 12:21:16 -0400 Message-ID: <28069.992708476@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200106/230 X-Sequence-Number: 3488 John Scott writes: > select count(*) from A where b = null; /* Returns 1, ok */ > select count(*) from A where b != null; /* Returns 0 ... not ok! */ Uh ... there have been several threads about this just in the past couple days. See for example http://www.ca.postgresql.org/mhonarc/pgsql-sql/2001-06/msg00102.html and followups. regards, tom lane