From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: zuming.jiang@inf.ethz.ch
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17976: Inconsistent results of SELECT using CASE WHEN clause
Date: Wed, 14 Jun 2023 19:55:27 -0400
Message-ID: <2025424.1686786927@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvpEvte6X9=Zt+Fd3cTazaT5a9KwYyTzocLz96wN8rky5Q@mail.gmail.com>
References: <17976-4b638b525e9a983b@postgresql.org>
<CAApHDvpEvte6X9=Zt+Fd3cTazaT5a9KwYyTzocLz96wN8rky5Q@mail.gmail.com>
David Rowley <dgrowleyml@gmail.com> writes:
> The first bad commit seems to be b448f1c8
Yeah, I think the proximate cause is the removal of the delay_upper_joins
restrictions in analyzejoins.c. That allows us to remove the join to
ref_0, which prior versions didn't do; but then that exposes the need to
clean up dead references in EquivalenceClasses. I'm wondering a bit
now if there are variants of this that'd fail in pre-v16 branches.
It's not obvious to me offhand why delay_upper_joins would have prevented
all cases where a removable rel could be mentioned in an EquivalenceClass
member (presumably via the ph_rels set of a PHV).
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, zuming.jiang@inf.ethz.ch, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17976: Inconsistent results of SELECT using CASE WHEN clause
In-Reply-To: <2025424.1686786927@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