From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron Johnson <ronljohnsonjr@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Odd Shortcut behaviour in PG14
Date: Thu, 23 Nov 2023 14:45:23 -0500
Message-ID: <3170786.1700768723@sss.pgh.pa.us> (raw)
In-Reply-To: <CANzqJaCUroe03WUn1gdGK334ivyYPus338CfvMsBknudWGqFpg@mail.gmail.com>
References: <DB9P251MB0546E102DB0B567C40205976A7B9A@DB9P251MB0546.EURP251.PROD.OUTLOOK.COM>
<CANzqJaCUroe03WUn1gdGK334ivyYPus338CfvMsBknudWGqFpg@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, ronljohnsonjr@gmail.com
Subject: Re: Odd Shortcut behaviour in PG14
In-Reply-To: <3170786.1700768723@sss.pgh.pa.us>
References: <DB9P251MB0546E102DB0B567C40205976A7B9A@DB9P251MB0546.EURP251.PROD.OUTLOOK.COM> <CANzqJaCUroe03WUn1gdGK334ivyYPus338CfvMsBknudWGqFpg@mail.gmail.com> <3170786.1700768723@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox