Re: Skip ExecCheckRTPerms in CTAS with no data
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-09-28T14:18:17Z
Lists: pgsql-hackers
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> writes: > In case of CTAS with no data, we actually do not insert the tuples > into the created table, so we can skip checking for the insert > permissions. Anyways, the insert permissions will be checked when the > tuples are inserted into the table. I'd argue this is wrong. You don't get to skip permissions checks in ordinary queries just because, say, there's a LIMIT 0 on the query. regards, tom lane
Commits
-
Remove INSERT privilege check at table creation of CTAS and matview
- 878f3a19c6c8 14.0 landed
-
Relax INSERT privilege requirement for CTAS and matviews WITH NO DATA
- 846005e4f382 14.0 landed