pgsql: Allow SET TABLESPACE to database default - Mailing list pgsql-committers

From Stephen Frost
Subject pgsql: Allow SET TABLESPACE to database default
Date
Msg-id E1W4ffU-0001ww-3t@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Allow SET TABLESPACE to database default

We've always allowed CREATE TABLE to create tables in the database's default
tablespace without checking for CREATE permissions on that tablespace.
Unfortunately, the original implementation of ALTER TABLE ... SET TABLESPACE
didn't pick up on that exception.

This changes ALTER TABLE ... SET TABLESPACE to allow the database's default
tablespace without checking for CREATE rights on that tablespace, just as
CREATE TABLE works today.  Users could always do this through a series of
commands (CREATE TABLE ... AS SELECT * FROM ...; DROP TABLE ...; etc), so
let's fix the oversight in SET TABLESPACE's original implementation.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1fe06595ab9124e47a6d7935e1796e7c31c03c1f

Modified Files
--------------
src/backend/commands/tablecmds.c |   15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Make various variables const (read-only).
Next
From: Stephen Frost
Date:
Subject: pgsql: Allow SET TABLESPACE to database default