1. 16 Nov, 2020 1 commit
    • Michael Paquier's avatar
      Relax INSERT privilege requirement for CTAS and matviews WITH NO DATA · 846005e4
      Michael Paquier authored
      When specified, WITH NO DATA does not insert any data into the relation
      created, so skip checking for the insert permissions.  With WITH DATA or
      WITH NO DATA, it is always required for the user to have CREATE
      privileges on the schema targeted for the relation.
      
      Note that plain CREATE TABLE AS or CREATE MATERIALIZED VIEW queries have
      begun to work accidentally without INSERT privilege checks as of
      874fe3ae, while using EXECUTE or EXPLAIN ANALYZE would fail with the ACL
      check, so this makes the behavior for all the command flavors consistent
      with each other.  This is arguably a bug fix, but there have been no
      complaints about the current behavior either so stable branches are not
      changed.
      
      While on it, document properly the privileges requirements for each
      commands with more tests for all the scenarios possible, and avoid a
      useless bulk-insert allocation when using WITH NO DATA.
      
      Author: Bharath Rupireddy
      Reviewed-by: Anastasia Lubennikova, Michael Paquier
      Discussion: https://postgr.es/m/CALj2ACWc3N8j0_9nMPz9wcAUnVcdKHzFdDZJ3hVFNEbqtcyG9w@mail.gmail.com
      846005e4
  2. 15 Nov, 2020 7 commits
  3. 14 Nov, 2020 3 commits
  4. 13 Nov, 2020 2 commits
  5. 12 Nov, 2020 12 commits
  6. 11 Nov, 2020 9 commits
  7. 10 Nov, 2020 5 commits
  8. 09 Nov, 2020 1 commit