model-writtenrun 317 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- SATYANARAYANA NARLAPURAM reported that EXCLUDED virtual generated columns caused errors on plain tables and silent NULL writes on partitioned tables, and proposed changing setrefs.c target-list indexing to support both cases #1.
- Dean Rasheed demonstrated that the initial fix still failed when a generation expression was a simple Var, then supplied a replacement that left the EXCLUDED target list unexpanded while preserving expansion elsewhere in the query #2.
- SATYANARAYANA NARLAPURAM reported that the failing cases and regression tests passed #3, and Dean committed the replacement with only rebase and whitespace differences as cf38dedf69, announcing a backpatch to PostgreSQL 18 #4.
- Alexander Lakhin later reported that a generation expression using tableoid now produced an internal target-list error #5, prompting Ayush Tiwari to propose adding tableoid to the EXCLUDED target list #6.
- Dean argued that EXCLUDED represents proposed values and has no system columns #7; after Ayush suggested interpreting tableoid as the prospective insertion table #8, Dean rejected that interpretation because indirect access through generated columns would contradict the prohibition on direct EXCLUDED.tableoid references #9.
- Ayush replaced the support patch with explicit rejection of expanded tableoid references and an expected-error regression test; this follow-up remained under review at the end of the thread, with placement, error wording, and backpatching to PostgreSQL 18 still raised for discussion #10.