Fix how SJE checks against PHVs
Alexander Korotkov <akorotkov@postgresql.org>
Fix how SJE checks against PHVs It seems that a PHV evaluated/needed at or below the self join should not have a problem if we remove the self join. But this requires further investigation. For now, we just do not remove self joins if the rel to be removed is laterally referenced by PHVs. Discussion: https://postgr.es/m/CAMbWs4-ns73VF9gi37q61G3dS6Xuos+HtryMaBh37WQn=BsaJw@mail.gmail.com Author: Richard Guo
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/plan/analyzejoins.c | modified | +2 −2 |
| src/test/regress/expected/join.out | modified | +15 −0 |
| src/test/regress/sql/join.sql | modified | +6 −0 |
Discussion
- BUG #18187: Unexpected error: "variable not found in subplan target lists" triggered by JOIN 24 messages · 2023-11-07 → 2023-12-25