BUG #1252: Optimization of SELECT for NOT NULL case - Mailing list pgsql-bugs

From PostgreSQL Bugs List
Subject BUG #1252: Optimization of SELECT for NOT NULL case
Date
Msg-id 20040913235707.DFCC25A1033@www.postgresql.com
Whole thread Raw
Responses Re: BUG #1252: Optimization of SELECT for NOT NULL case  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1252
Logged by:          Alexander Kirpa

Email address:      postgres@bilteks.com

PostgreSQL version: 8.0 Beta

Operating system:   FreeBSD 5.2.1

Description:        Optimization of SELECT for NOT NULL case

Details:

CREATE TABLE x (id int4 NOT NULL);
Populate table, for instance, 10M rows;
SELECT count(*) from x WHERE x IS NULL;
Optimizator should rewrite "x IS NULL" to simple "false"

Best regards,
 Alexander Kirpa

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: 8.0B2 psql \e
Next
From: "wisan watcharinporn"
Date:
Subject: table and column name