Re: Odd Shortcut behaviour in PG14 - Mailing list pgsql-general

From Tom Lane
Subject Re: Odd Shortcut behaviour in PG14
Date
Msg-id 3170786.1700768723@sss.pgh.pa.us
Whole thread Raw
In response to Re: Odd Shortcut behaviour in PG14  (Ron Johnson <ronljohnsonjr@gmail.com>)
Responses RE: Odd Shortcut behaviour in PG14
List pgsql-general
Ron Johnson <ronljohnsonjr@gmail.com> writes:
> Out of curiosity, what is the point of adding the "true" predicate no
> matter the position?  Maybe I've created an incorrect truth table, but
> "true AND" (and "AND true") don't make any logical difference when added
> to (ekey > 0)*.*

Not only does it not make any logical difference, but it shouldn't
make any practical difference either, because the useless "true"
subclause will be thrown away very early in planning, before any
decisions would be taken on the strength of what is in the ON clause.
So I was skeptical that the details presented were even correct.
I think whatever is causing the behavioral change is something else
that the OP hasn't identified/controlled for.  Hard to tell with
such fragmentary details.

            regards, tom lane



pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: IPV6 issue
Next
From: Adrian Klaver
Date:
Subject: Re: IPV6 issue