]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Allow SET TABLESPACE to database default
authorStephen Frost <sfrost@snowman.net>
Sat, 18 Jan 2014 23:41:52 +0000 (18:41 -0500)
committerStephen Frost <sfrost@snowman.net>
Sat, 18 Jan 2014 23:49:08 +0000 (18:49 -0500)
commit86e58ae023a93e778cec195b19ffe7ccb01f7038
treedce0344b0a40d56d0fc854483742734e3536de31
parent586bea6124cd64e495856f97caa612b717cd5de2
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.
src/backend/commands/tablecmds.c