diff options
author | Michael Paquier <michael@paquier.xyz> | 2020-11-21 19:45:30 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2020-11-21 19:45:30 +0900 |
commit | 878f3a19c6c8ff197e4a33f51d921a4abafcc494 (patch) | |
tree | b895e7f7b5e4183e8837d5e13af823a78df6b78e /doc/src | |
parent | a47834db0fb70256e676862f1d96374a9e114d82 (diff) | |
download | postgresql-878f3a19c6c8ff197e4a33f51d921a4abafcc494.tar.gz postgresql-878f3a19c6c8ff197e4a33f51d921a4abafcc494.zip |
Remove INSERT privilege check at table creation of CTAS and matview
As per discussion with Peter Eisentraunt, the SQL standard specifies
that any tuple insertion done as part of CREATE TABLE AS happens without
any extra ACL check, so it makes little sense to keep a check for INSERT
privileges when using WITH DATA. Materialized views are not part of the
standard, but similarly, this check can be confusing as this refers to
an access check on a table created within the same command as the one
that would insert data into this table.
This commit removes the INSERT privilege check for WITH DATA, the
default, that 846005e removed partially, but only for WITH NO DATA.
Author: Bharath Rupireddy
Discussion: https://postgr.es/m/d049c272-9a47-d783-46b0-46665b011598@enterprisedb.com
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/create_materialized_view.sgml | 3 | ||||
-rw-r--r-- | doc/src/sgml/ref/create_table_as.sgml | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/create_materialized_view.sgml b/doc/src/sgml/ref/create_materialized_view.sgml index e4ea049eff5..d8c48252f49 100644 --- a/doc/src/sgml/ref/create_materialized_view.sgml +++ b/doc/src/sgml/ref/create_materialized_view.sgml @@ -52,8 +52,7 @@ CREATE MATERIALIZED VIEW [ IF NOT EXISTS ] <replaceable>table_name</replaceable> <para> <command>CREATE MATERIALIZED VIEW</command> requires <literal>CREATE</literal> privilege on the schema used for the materialized - view. If using <command>WITH DATA</command>, the default, - <literal>INSERT</literal> privilege is also required. + view. </para> </refsect1> diff --git a/doc/src/sgml/ref/create_table_as.sgml b/doc/src/sgml/ref/create_table_as.sgml index 2cac4e3ec01..07558ab56c9 100644 --- a/doc/src/sgml/ref/create_table_as.sgml +++ b/doc/src/sgml/ref/create_table_as.sgml @@ -56,9 +56,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI <para> <command>CREATE TABLE AS</command> requires <literal>CREATE</literal> - privilege on the schema used for the table. If using - <command>WITH DATA</command>, the default, <literal>INSERT</literal> - privilege is also required. + privilege on the schema used for the table. </para> </refsect1> |