model-writtenrun 3561 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Dean Rasheed proposed MERGE support for automatically updatable views, WITH CHECK OPTION, and trigger-updatable views in #1, excluding rule-based updates and mixed automatic/trigger actions because those cases would be substantially harder to support.
- Dean added documentation and moved rule rejection from the parser into the rewriter in #2, ensuring that expansion of a view hierarchy also detects unsupported rules on underlying relations.
- Dean fixed PlaceHolderVar handling in MERGE WHEN conditions in #3, then adapted the patch to upstream outer-join-aware Vars in #5, marking the target whole-row value nullable while removing a reproducer that no longer triggered the old failure.
- Following several rebases through #8, Dean returned in July with #9, renaming the new Query field to mergeTargetRelation for consistency with related MERGE work.
- jian he reported passing regression tests and raised documentation and whole-row tuple questions in #10; Dean explained the tuple handling and agreed to clarify the restriction on rules in #11.
- Dean incorporated the documentation feedback in #12 and additionally made rule checking ignore disabled rules, with a regression test, keeping that potentially separable fix inside the feature patch.
- After the January rebase in #14, Alvaro Herrera reviewed the code in #15 and questioned adding more effectively unreachable executor error checks.
- Dean retained the defensive checks but consolidated their implementation through exported rewriter helpers in #16, and Alvaro approved that revision in #17.
- Dean found that trigger-based MERGE updates skipped ExecUpdateEpilogue() and could miss an overlying view's CHECK OPTION in #18; he removed the redundant UpdateContext.updated flag, added regression coverage and security-barrier tests, and proposed committing the cleanup separately.
- Alvaro endorsed the final fix and the separate cleanup commit in #19.
- Dean first committed the unchanged flag-removal subset of #18 as 362de947cd.
- Dean then committed the remaining MERGE view support from #18 as 5f2e179bd3, adding an empty-target-list guard, a comment adjustment, and a catalog version bump.
- Dean confirmed both changes were pushed in #20, completing the submitted work while retaining the documented exclusions for rule-updatable views and mixtures of automatic and trigger-based actions.