Re: Huge speed penalty using <>TRUE instead of =FALSE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-bugs(at)postgresql(dot)org, Mikael Krantz <mk(at)zigamorph(dot)se>, Jan-Ivar Mellingen <jan-ivar(dot)mellingen(at)alreg(dot)no>
Subject: Re: Huge speed penalty using <>TRUE instead of =FALSE
Date: 2009-08-10 15:10:02
Message-ID: 2279.1249917002@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Jul 17, 2009 at 10:21 AM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Actually, now that I think about it, the planner already has
>> datatype-specific knowledge about boolean equality (see
>> simplify_boolean_equality). It would take just a few more lines of code
>> there to recognize "x <> true" and "x <> false" as additional variant
>> spellings of the generic "x" or "NOT x" constructs. Not sure if it's
>> worth the trouble though; how many people really write such things?

> I don't know, but there's probably somebody. I probably did it myself
> a few times, when I was just starting out. If it's easy, it seems
> worth doing.

http://archives.postgresql.org/pgsql-committers/2009-07/msg00164.php

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-08-10 15:15:42 Re: BUG #4972: RFE: convert timestamps to fractional seconds
Previous Message Robert Haas 2009-08-10 14:32:52 Re: BUG #4972: RFE: convert timestamps to fractional seconds