Re: Optimizer & boolean syntax - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Optimizer & boolean syntax
Date
Msg-id 19807.1037933455@sss.pgh.pa.us
Whole thread Raw
In response to Re: Optimizer & boolean syntax  (Daniele Orlandi <daniele@orlandi.com>)
List pgsql-hackers
Daniele Orlandi <daniele@orlandi.com> writes:
> The problem is the opposite... so, effectively, seems that the optimizer 
> considers "monitored" and "monitored=true" as two different expressions...

Check.

> The viceversa is analog and we also can see that the syntax "monitored 
> is true" is considered different from the other two syntaxes:

As it should be.

> What I propose is that all those syntaxes are made equivalent

Only two of them are logically equivalent.  Consider NULL.

Even for the first two, assuming equivalence requires hard-wiring an
assumption about the behavior of the "bool = bool" operator; which is
a user-redefinable operator.  I'm not totally comfortable with the idea.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: bug in pg_dumpall 7.3
Next
From: Tom Lane
Date:
Subject: Re: bug in pg_dumpall 7.3