pgsql: Check for INSERT privileges in SELECT INTO / CREATE TABLE AS.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Check for INSERT privileges in SELECT INTO / CREATE TABLE AS.
Date: 2011-11-22 21:16:53
Message-ID: E1RSxi1-0007Zf-2B@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Check for INSERT privileges in SELECT INTO / CREATE TABLE AS.

In the normal course of events, this matters only if ALTER DEFAULT
PRIVILEGES has been used to revoke default INSERT permission. Whether
or not the new behavior is more or less likely to be what the user wants
when dealing only with the built-in privilege facilities is arguable,
but it's clearly better when using a loadable module such as sepgsql
that may use the hook in ExecCheckRTPerms to enforce additional
permissions checks.

KaiGai Kohei, reviewed by Albe Laurenz

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f1b4aa2a84732255bd8a34fc9c7994a04409b77a

Modified Files
--------------
src/backend/executor/execMain.c | 17 ++++++++++++
src/test/regress/expected/select_into.out | 39 +++++++++++++++++++++++++++++
src/test/regress/sql/select_into.sql | 37 +++++++++++++++++++++++++++
3 files changed, 93 insertions(+), 0 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message User Hinoue 2011-11-22 21:50:13 psqlodbc - psqlodbc: Clear col_info(columns info) cache ehen DROP/ALTER
Previous Message Tom Lane 2011-11-22 21:06:38 pgsql: Still more review for range-types patch.