model-writtenrun 3429 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Laurenz Albe demonstrated that a BEFORE DELETE trigger returning NULL could cancel a cascading delete and leave an orphaned referencing row, then suggested an additional constraint check #1 #2.
- Tom Lane defended allowing triggers to react to foreign-key actions #3; Noah Misch considered the integrity hole undesirable but argued that a fix doubling heap fetches would be too expensive, suggesting a future optimization-oriented rewrite instead #6.
- Unable to find documentation of the hazard, Laurenz submitted a warning in the foreign-key section #5; shihao zhong reported documentation testing passed #7, while David G. Johnston requested clearer context and missing markup #8 #9.
- Laurenz made small clarity and markup changes #10, which Aleksander Alekseev endorsed #11, then adopted Pavel Luzanov's shorter responsibility wording while retaining the disputed statement that the behavior was not a bug #12 #14 #15.
- Pavel also raised surprising permission failures caused by system triggers executing as the table owner #13; Laurenz kept that issue outside this patch because referential integrity remained intact #14, and Pavel suggested broader system-trigger documentation as separate work #15.
- Tom rewrote the warning for the Triggers chapter, explaining how referential actions execute SQL commands that fire user-defined triggers #16; after Aleksander found that explanation harder to follow #17, Tom removed the system-trigger implementation detail and Aleksander approved the resulting paragraph #18 #19.
- Tom committed the attached rewrite with those final wording edits as 2fb7560cc8 and announced completion #20; the documentation change landed, while runtime enforcement changes and broader system-trigger documentation remained unimplemented in this thread.