]> granicus.if.org Git - postgresql/commit
Check for INSERT privileges in SELECT INTO / CREATE TABLE AS.
authorRobert Haas <rhaas@postgresql.org>
Tue, 22 Nov 2011 21:16:26 +0000 (16:16 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 22 Nov 2011 21:16:26 +0000 (16:16 -0500)
commitf1b4aa2a84732255bd8a34fc9c7994a04409b77a
tree750c149500d4c90fc8c2c93cf553621954f4b997
parent766948beddef66dd89563f465919eca6e131861c
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
src/backend/executor/execMain.c
src/test/regress/expected/select_into.out
src/test/regress/sql/select_into.sql