Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (8.11.3/8.11.4) with SMTP id fACEm3m08561 for ; Mon, 12 Nov 2001 09:48:04 -0500 (EST) (envelope-from ch@rodos.fzk.de) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Mon Nov 12 15:48:06 2001 +0100 Received: by rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id PAA21751; Mon, 12 Nov 2001 15:50:57 +0100 (MET) From: Haller Christoph Message-Id: <200111121446.PAA23138@rodos> Subject: Re: no cond returns diff res than cond or !cond To: twanger@bluetwanger.de (Markus Bertheau) Date: Mon, 12 Nov 2001 15:46:12 MET Cc: pgsql-sql@postgresql.org In-Reply-To: <1005575205.31390.2.camel@entwicklung01.cenes.de>; from "Markus Bertheau" at Nov 12, 101 3:24 pm X-Mailer: Elm [revision: 212.4] X-Archive-Number: 200111/156 X-Sequence-Number: 5540 Hi Markus, AFAIK the SQL standard says for querying columns to be NULL resp. NOT NULL select count(*) from produkte where artnummer is NULL or artnummer is NOT NULL ; Please try and let me know about your results. Regards, Christoph > > Good day, > > feline=> select version(); > version > --------------------------------------------------------------- > PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc 2.95.2 > (1 row) > > feline=> select count(*) from produkte; > count > ------- > 36405 > (1 row) > > feline=> select count(*) from produkte where artnummer != NULL or > artnummer = NULL; > count > ------- > 36347 > (1 row) > > cenes_test=> select version(); > version > ------------------------------------------------------------- > PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC 2.96 > (1 row) > > cenes_test=> select count(*) from produkte; > count > ------- > 36384 > (1 row) > > cenes_test=> select count(*) from produkte where artnummer = NULL or > artnummer != NULL; > count > ------- > 36326 > (1 row) > > 2nd query 58 less than first. > > bug? > > Markus Bertheau > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >