model-writtenrun 8878 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane proposed separating semantic Var identity from syntactic spelling, renaming varnoold/varoattno, and using join-alias Vars to distinguish values affected by outer joins in #1.
- Robert Haas questioned how nested join aliases would map to base relations and suggested nullable equivalence-class members in #2; Tom explained the existing alias-flattening machinery and why nullable values needed a distinct representation in #3.
- Tom abandoned join-alias Vars as the nullability representation because JOIN USING coercions and whole-row references could not preserve the required semantics, but posted useful preparatory parser refactoring in #4.
- Robert advocated tracking sets of nulling joins and deriving the information during parsing in #5; Tom weighed bitmapset costs against their advantages for join reordering in #6, while Andres Freund discussed potential execution benefits and richer nullability states in #7.
- The preparatory patch from #4 landed unchanged as b541e9accb, passing namespace items through Var lookup and construction and avoiding repeated range-table searches.
- Tom extended namespace-item APIs and cached per-column metadata in #8, reporting a roughly 20% parse-analysis speedup on one complex query; this landed as 5815696bc6 with naming, comment, and assertion cleanup.
- After confirming that landing, Tom posted #9 to generate direct input-column Vars wherever possible, preserve syntactic identity through varnosyn/varattnosyn, and give the deparser explicit join-column mappings; it landed as 9ce77d75c5 with an additional catalog-version bump.
- Tom left skipping join-alias flattening entirely for more queries to a possible separate patch because whole-row join references lacked cheap tracking, and declined backpatching the incidental coercion-function dependency fix because its failure scenario was exceptionally narrow #9.
- Returning to the broader planner work, Tom favored parser-generated NullableVar wrappers and supplied draft explanatory prose in #10, but had written no implementation and still needed to resolve how wrappers would interact with outer-join reordering.
- By December 2021, all three attached patches had landed but the NullableVar work remained on the back burner: Andrei Lepikhov revived the topic in #11, Tom confirmed its deferred status in #12, and Andrei offered to develop it while requesting a structure sketch or draft code in #13.