model-writtenrun 2320 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- jian he reported that INSERT incorrectly checked a generated column's NULL placeholder against domain constraints before computing its value, proposed a rewrite-time fix in #1, and refined comments and error reporting in #2.
- In #3, jian he moved the fix into expand_insert_targetlist, constructing a NULL of the domain's base type and adjusting ExecCheckPlanOutput while dropping the parser and rewriter changes.
- Tom Lane confirmed the planner was the appropriate location and supplied #4, making planner and executor branches parallel, requiring only a NULL constant for generated columns, simplifying stored-column tests, and aligning virtual-column tests.
- jian he approved the revised checks and tests in #5, explaining that his separate work on domains for virtual generated columns had motivated omitting those tests earlier.
- Tom Lane committed the final revision as 4604928edd, whose supplied branch version preserves the implementation with older regression-test layout, and confirmed completion and backpatching through PostgreSQL 14 in #6; PostgreSQL 13 was left unfixed because an attempted adaptation caused UPDATE errors and the regression risk outweighed the benefit.