Re: Skip ExecCheckRTPerms in CTAS with no data - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Skip ExecCheckRTPerms in CTAS with no data
Date
Msg-id 52f923e0-c07f-a55a-9364-a55ab3b0e100@enterprisedb.com
Whole thread Raw
In response to Re: Skip ExecCheckRTPerms in CTAS with no data  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Skip ExecCheckRTPerms in CTAS with no data  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
On 2020-11-17 02:32, Michael Paquier wrote:
>> The SQL standard says that for CREATE TABLE AS, the INSERT "is effectively
>> executed without further Access Rule checking", which means the INSERT
>> privilege shouldn't be required at all.  I suggest we consider doing that
>> instead.  I don't see a use for the current behavior.
> Hmm.  Is there anything specific for materialized views?  They've
> checked for INSERT privileges at this phase since their introduction
> in 3bf3ab8c.

Materialized views are not in the SQL standard.

But if you consider materialized views as a variant of normal views, 
then the INSERT privilege would be applicable if you pass an INSERT on 
the materialized view through to the underlying tables, like for a view.

Also note that REFRESH on a materialized view does not check any 
privileges (only ownership), so having a privilege that only applies 
when the materialized view is created doesn't make sense.



pgsql-hackers by date:

Previous
From: Avinash Kumar
Date:
Subject: Tracking Object creation or modified time !
Next
From: Tom Lane
Date:
Subject: Re: Different results between PostgreSQL and Oracle for "for update" statement