model-writtenrun 7950 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Bharath Rupireddy proposed skipping INSERT privilege checks for CTAS WITH NO DATA in #1; Tom Lane objected that producing no rows does not normally excuse permission checks in #2, while Bharath argued that creating an empty table should resemble ordinary CREATE TABLE in #3.
- Anastasia Lubennikova reviewed the initial patch and requested regression tests in #5; Michael Paquier raised the risk of bypassing the executor permission hook in #6, and Bharath explained that later INSERT and COPY operations would still perform their checks in #7.
- Bharath added tests and extended the patch to avoid unnecessary bulk-insert state allocation and cleanup for WITH NO DATA in #8.
- Michael identified that plain CTAS WITH NO DATA already succeeded without INSERT privilege while EXPLAIN ANALYZE and EXECUTE behaved differently in #9, then requested documentation and broader test coverage in #10.
- Bharath expanded documentation and tests in #11, then separated materialized-view tests and refined privilege wording in #13 following Michael's review in #12.
- Michael committed #13 as 846005e4f3, retaining the implementation while polishing comments, explicitly initializing bulk-insert state, and restructuring tests; his announcement in #14 also explained the required regress_ prefix for test roles.
- Peter Eisentraut challenged the remaining WITH DATA restriction in #15, explaining that the SQL standard requires CTAS population without further access checks; after Michael asked about materialized views in #16, Peter noted in #17 that REFRESH checks ownership rather than INSERT privilege.
- Bharath proposed removing INSERT checks from all CTAS and CREATE MATERIALIZED VIEW variants while preserving schema CREATE checks and existing REFRESH behavior in #18; Michael supported deleting the ACL_INSERT block and retaining subsequent-INSERT tests in #19, and Peter agreed in #20.
- Peter and Bharath also discussed possible future automatically updatable materialized views in #21 and #22, but no implementation of that idea was submitted in this thread.
- Bharath submitted the follow-up removal in #23, which Michael committed as 878f3a19c6 after removing unnecessary INSERT commentary and reorganizing tests; the final message #24 confirms that both stages had landed.