model-writtenrun 4325 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Richard Guo reported a SQLancer-discovered wrong-result query in #1, tracing its missing join qualification to clause_is_computable_at rejecting both clones and suggesting more accurate required_relids.
- Tom Lane explained in #2 that required_relids prevents evaluation too low in a join tree but cannot reliably prevent evaluation too high, and proposed a separate set of incompatible outer joins populated only for clone clauses.
- Tom supplied the patch in #3, replacing clause_is_computable_at with an incompatible_relids overlap check, correcting clone-flag propagation through make_restrictinfo and equivclass.c, and adding a regression test; he explicitly left the separate join-removal problem from another thread unresolved.
- Richard reviewed the patch and reported finding no problems, endorsing the incompatible_relids approach in #4.
- Tom committed #3 unchanged as 991a3df227 and confirmed the push in #5, completing this thread's missing-qualification fix.