model-writtenrun 2689 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Kirill Reshke proposed passing existing ParseState objects into utility type lookups so errors could identify their SQL location, motivated by CREATE SCHEMA containing CREATE DOMAIN, while initially leaving two ALTER TABLE execution paths alone #1.
- Jian he expanded the proposal to ALTER TABLE paths and many CREATE DOMAIN errors, introducing additional ParseState allocations and regression tests #2.
- Michael Paquier requested stronger error-path coverage and noted that making every typenameType() caller supply a non-NULL ParseState was unsuitable; Kirill and Jian then expanded tests, corrected platform-specific collation outputs, and added further diagnostics #4 #5 #6 #7.
- Álvaro Herrera requested a description framed around SQL commands and discouraged unnecessary ereport() parentheses, which Kirill addressed in the next revision #8 #9.
- Michael requested separate baseline tests and implementation patches to expose the diagnostic differences clearly; Kirill performed that split, and Jian subsequently added constraint-related error locations #10 #11 #12.
- Tom Lane objected to creating ParseState objects throughout tablecmds.c and proposed propagating the utility ParseState through AlterTableUtilityContext, while deferring broader ProcessUtility interface changes #13.
- Michael committed a trimmed version of the test patch from #12 as 0172b4c944, removing duplicate and repetitive cases, leaving exclusion-constraint coverage out, and identifying separate CREATE DOMAIN grammar/documentation questions #15.
- Jian acknowledged that AlterType() lacked useful location information, and Michael requested further separation by implementation approach; Jian then removed AlterType() changes and submitted distinct CREATE DOMAIN and other-DDL patches #14 #16 #17.
- Michael checked the alternate collation outputs and committed the CREATE DOMAIN patch from #17 unchanged as 39240bcad5, while continuing to question the additional ALTER TABLE ParseState allocations #18.
- Jian removed ATExecAddOf() changes and the unnecessary ATExecAlterColumnType() changes, explaining that preparation already caught the relevant errors, and split the remaining work into column-type preparation, constraint diagnostics, and existing-ParseState type lookups #19.
- Michael committed the existing-ParseState type-lookup patch from #19 unchanged as 0f23dedc91, adding locations for CREATE TYPE LIKE and CREATE TABLE OF errors.
- Michael requested more complete ATPrepAlterColumnType() coverage and questioned confusing identity and constraint cursor positions; Jian supplied the expanded column-type patch and suggested an explanatory hint for implicit NOT NULL inheritance instead of those constraint cursors #20 #21.
- After a month, Michael committed #21 with only whitespace and rebase differences as 65281391a9; his final reply accepted the broader coverage, considered two additional coercion diagnostics unnecessary because they already had hints, and left the proposed constraint hint unresolved #22.