model-writtenrun 3350 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- BenoƮt Ryder reported inconsistent results from equivalent lateral-join queries on older PostgreSQL releases in #1; after David G. Johnston suggested integer rounding in #2, Ryder demonstrated that adding the WHERE clause actually changed the returned value in #3.
- Tom Lane traced the wrong answers to a WHERE condition incorrectly applied below an outer join in #4, explaining that the outer-join-aware Var work already made PostgreSQL 16 behave correctly.
- Workaround discussion in #6, #7, and #8 established that disabling nested loops helped only some queries and MATERIALIZED fixed the CTE example, without establishing a general workaround for the other forms.
- Tom's initial patches in #9 addressed unchecked EquivalenceClass-derived clauses by filtering nullable_relids on older branches; full movability checks initially broke existing tests because constant expressions in appendrel children lacked the necessary relation identifiers.
- Richard Guo supported filtering but warned that inconsistent movability decisions could duplicate clauses in #10; Tom responded with revised patches in #12 that repaired child clause_relids, used full movability filtering before PostgreSQL 16, and asserted the invariant on HEAD/v16 while avoiding a risky stable-branch API change.
- Richard endorsed both revised patches and proposed a focused UNION ALL regression test in #13; Tom explained in #14 that existing tests already exercised the assertion, while acknowledging that a dedicated test could be more robust.
- The older-branch fix landed as f502849d49, matching the filtering, child-relid repair, and regression coverage described in #12, although the missing revised attachments prevent an exact comparison.
- The HEAD/v16 variant from #12 landed on the development branch as 03107b4eda and on v16 as 91800af137; these are the same change, adding the child-relid repair and assertions without the older-branch test.
- After the fixes landed, Corey Huinker submitted additional tests in #15 formalizing the five original reproducer queries, citing a recent need for the subselect case; this final submission has no review or landing shown in the supplied thread.