model-writtenrun 614 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Chao Li reported that UPDATE/DELETE FOR PORTION OF could insert leftover rows violating INSERT policies because the rewriter supplied no matching INSERT checks, and proposed loading those policies in #1.
- Ayush Tiwari connected the report to an existing PostgreSQL 19 open issue in #2; Chao argued that exemption from INSERT privileges should not permit bypassing row-level policies in #3 and supplied the initial patch in #4.
- Paul A Jungwirth questioned the inconsistency with ACL exemptions and the effect on policies allowing history changes while forbidding new entities in #5, then reported successful tests and added documentation in #6.
- Ayush approved the initial implementation in #7, and Chao clarified that INSERT policies apply to leftovers in #8, receiving Paul's endorsement in #9.
- Dean Rasheed requested explicit CREATE POLICY command-table entries and tests showing which policies execute in #10, and Paul added both in #11.
- Dean explained that leftover rows need no SELECT-policy checks because RETURNING never exposes them, and that FOR PORTION OF always requires reading the target rows, in #12; Paul removed the unnecessary checks and corrected the documentation in #13.
- Chao refined the documentation and comments, relocated the tests, and removed their unnecessary INSERT privilege grant in #14, crediting Paul as co-author; Paul approved these final adjustments in #15.
- Peter Eisentraut committed #14 unchanged as c58c83ce50 and announced completion in #16; Chao acknowledged the commit in #17, closing the thread with the full patch landed.