Skip ExecCheckRTPerms in CTAS with no data

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Skip ExecCheckRTPerms in CTAS with no data
Date: 2020-09-28 12:28:49
Message-ID: CALj2ACWc3N8j0_9nMPz9wcAUnVcdKHzFdDZJ3hVFNEbqtcyG9w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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.

Attaching a small patch doing $subject.

Thoughts?

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v1-Skip-ExecCheckRTPerms-in-CTAS-with-no-data.patch application/octet-stream 2.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amul Sul 2020-09-28 12:29:41 Re: [Patch] ALTER SYSTEM READ ONLY
Previous Message Amit Kapila 2020-09-28 12:25:00 Re: Parallel INSERT (INTO ... SELECT ...)