model-writtenrun 7051 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- jian he reported that ALTER CONSTRAINT ... NOT VALID incorrectly described a CHECK constraint as a foreign key in #1, Tender Wang confirmed the mismatch in #2, and Alvaro Herrera pointed to earlier proposed work in #3.
- jian he submitted a minimal parser-level rejection in #4; Fujii Masao requested more explicit wording in #5, which jian adopted in the update described in #6, before Fujii noted that other ALTER commands could also encounter the error in #7.
- Fujii Masao moved the rejection into ATExecAlterConstraint() in #8 to preserve other ALTER commands' existing diagnostics; jian he accepted the approach with a typo correction in #9, but Alvaro Herrera rejected its complexity in #10.
- Fujii Masao explained why checking NOT VALID before processCASbits() was sufficient and identified the related trigger issue in #11; Alvaro Herrera returned to that simpler parser design, reworded the error, and added constraint-trigger handling and tests in #12.
- Alvaro Herrera split the work into three patches in #13, separating the ALTER CONSTRAINT fix for PostgreSQL 18 and 19 from trigger tests and wording changes intended only for PostgreSQL 19 because the longstanding trigger diagnostics had attracted no user complaints.
- After Fujii Masao requested an explicit error code in #14, e16c9cd331 landed the ALTER CONSTRAINT portion of #13 with that error code and an explanatory comment, while the trigger work remained pending.
- Fujii Masao identified the additional ENFORCED case in #15, and Alvaro Herrera posted the remaining trigger work in #16, choosing to accept ENFORCED because constraint triggers already enforce their constraints and crediting Amul Sul as author.
- Fujii Masao accepted that behavior and requested documentation in #17; 87251e1149 landed #16 with the added ENFORCED documentation, making this July submission the latest matching source despite the earlier work and competing attribution in thread #51178.
- Alvaro Herrera confirmed the documentation addition and push in #18, leaving both fixes committed and no outstanding work identified in the thread.