Kevin Grittner <kgrittn@ymail.com> writes:
> I have a memory of running into this in real-world production code
> and that it involved booleans. I'll see whether I posted something
> to the community lists about it, but it didn't take long to produce
> an (admittedly artificial) case where incorrect results are
> silently returned:
> test=# select 'f'::boolean = 'f'::boolean >= 'f'::boolean;
> ?column?
> ----------
> f
> (1 row)
> test=# select 'f'::boolean >= 'f'::boolean >= 'f'::boolean;
> ?column?
> ----------
> t
> (1 row)
One of the reasons I want to make these operators %nonassoc is
so you get an error on cases like these --- if you actually meant
this, you'll be forced to parenthesize one way or the other.
regards, tom lane