Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id B004D63462C for ; Sun, 19 Jul 2009 21:30:52 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43769-02-4 for ; Sun, 19 Jul 2009 21:30:41 -0300 (ADT) Received: from cvs.postgresql.org (cvs.postgresql.org [217.196.146.206]) by mail.postgresql.org (Postfix) with ESMTP id D13EA635C80 for ; Sun, 19 Jul 2009 21:24:32 -0300 (ADT) Received: by cvs.postgresql.org (Postfix, from userid 1007) id 2060E75331E; Mon, 20 Jul 2009 00:24:31 +0000 (UTC) MIME-Version: 1.0 To: pgsql-committers@postgresql.org Subject: pgsql: Teach simplify_boolean_equality to simplify the forms foo <> true X-Mailer: activitymail 1.24, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain Message-Id: <20090720002431.2060E75331E@cvs.postgresql.org> Date: Mon, 20 Jul 2009 00:24:31 +0000 (UTC) From: tgl@postgresql.org (Tom Lane) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200907/165 X-Sequence-Number: 37768 Log Message: ----------- Teach simplify_boolean_equality to simplify the forms foo <> true and foo <> false, along with its previous duties of simplifying foo = true and foo = false. (All of these are equivalent to just foo or NOT foo as the case may be.) It's not clear how often this is really useful; but it costs almost nothing to do, and it seems some people think we should be smart about such cases. Per recent bug report. Modified Files: -------------- pgsql/src/backend/optimizer/util: clauses.c (r1.277 -> r1.278) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/clauses.c?r1=1.277&r2=1.278) pgsql/src/include/catalog: pg_operator.h (r1.166 -> r1.167) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_operator.h?r1=1.166&r2=1.167)