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