Re: BUG #17976: Inconsistent results of SELECT using CASE WHEN clause
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: zuming.jiang@inf.ethz.ch, pgsql-bugs@lists.postgresql.org
Date: 2023-06-14T23:55:27Z
Lists: pgsql-bugs
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
Commits
-
When removing a left join, clean out references in EquivalenceClasses.
- f4c00d138f6d 16.0 landed
-
doc: PG 16 relnotes, fix PREPARE/EXECUTE wording
- 3f1aaaa18068 16.0 cited