model-writtenrun 3066 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Vasya B reported that EXPLAIN VERBOSE on information_schema.element_types failed with a missing-subquery-plan error, while ordinary EXPLAIN worked #1.
- Richard Guo traced the failure to a constant-false condition eliminating the subquery plan needed to identify RECORD fields, supplied a reduced reproducer and an inline synthetic-name fix, and demonstrated the equivalent CTE failure #2.
- Tom Lane traced the regression to planner changes dating from PostgreSQL 9.6 and proposed replacing dummy Result target-list expressions with NULL constants to eliminate dangling references #3.
- After experimenting, Tom abandoned NULL replacement because it obscured useful EXPLAIN output, weakened regression tests, and interfered with removing trivial SubqueryScan nodes; he attached both alternatives and selected Richard's fallback approach, using fN field names with updated comments and regression tests #4.
- Richard suggested assertions checking the expected plan types #5; Tom adopted them and announced the fix had landed, except that PostgreSQL 12 omitted the assertions to avoid risk near end of support #7. The supplied commit 7408772de5 contains the fallback from #4 with light naming, branch-adaptation, and comment edits, and credits Richard and Tom jointly.
- After the commit, Andrei Lepikhov proposed allowing CustomScan in the new assertions to accommodate similar RECORD-field failures #8; Tom requested a documented justification and flagged an unrelated Makefile edit, which Andrei acknowledged was accidental #9 #10.
- Tom explained that childless Result nodes justify the fallback because their expressions cannot execute, but asked for an equivalent argument for CustomScan and whether ForeignScan would need the same treatment #11; Andrei agreed to investigate ForeignScan reproduction #12.
- The original fix remained landed, while the CustomScan follow-up remained unresolved: Andrei found ForeignScan reproduction difficult and ended by asking whether CustomScan should share its target-list restrictions and whether those restrictions should be documented #13.