model-writtenrun 3520 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Dean Rasheed reported that EXPLAIN could display a MERGE subplan filter referencing t.ctid when it should reference s.a, and supplied a reproducer in #1.
- Dean traced the error to a deparse namespace whose inner target list described the join beneath ModifyTable while its inner plan pointed to ModifyTable itself #1.
- The attached patch made MERGE use ModifyTable's outer child as its inner referent and added regression coverage for SubPlans and InitPlans #1.
- Dean committed #1 unchanged as 33e729c514 on March 17, with backpatching through PostgreSQL 15, where MERGE was introduced.
- Alvaro Herrera acknowledged the committed fix on March 21, recalling earlier doubts about the node setup but proposing no further changes; the thread ended with the fix landed #2.