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

From Tom Lane
Subject Re: Skip ExecCheckRTPerms in CTAS with no data
Date
Msg-id 262866.1601302697@sss.pgh.pa.us
Whole thread Raw
In response to Skip ExecCheckRTPerms in CTAS with no data  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Skip ExecCheckRTPerms in CTAS with no data
List 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: The return value of SPI_connect
Next
From: "Andrey M. Borodin"
Date:
Subject: Re: MultiXact\SLRU buffers configuration