Fix thinko in join removal.
Tom Lane <tgl@sss.pgh.pa.us>
Fix thinko in join removal. In commit 9df8f903e I (tgl) switched join_is_removable() from using the min relid sets of the join under consideration to using its full syntactic relid sets. This was a mistake, as it allowed join removal in cases where a reference to the join output would survive in some syntactically-lower join condition. Revert to the former coding. Richard Guo Discussion: https://postgr.es/m/CAMbWs4-EU9uBGSP7G-iTwLBhRQ=rnZKvFDhD+n+xhajokyPCKg@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/plan/analyzejoins.c | modified | +4 −7 |
| src/test/regress/expected/join.out | modified | +16 −0 |
| src/test/regress/sql/join.sql | modified | +5 −0 |
Discussion
- Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware) 46 messages · 2023-02-22 → 2023-05-22