Thread: pgsql: Add ALTER TABLESPACE ... MOVE command

pgsql: Add ALTER TABLESPACE ... MOVE command

From
Stephen Frost
Date:
Add ALTER TABLESPACE ... MOVE command

This adds a 'MOVE' sub-command to ALTER TABLESPACE which allows moving sets of
objects from one tablespace to another.  This can be extremely handy and avoids
a lot of error-prone scripting.  ALTER TABLESPACE ... MOVE will only move
objects the user owns, will notify the user if no objects were found, and can
be used to move ALL objects or specific types of objects (TABLES, INDEXES, or
MATERIALIZED VIEWS).

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/76e91b38ba64e1da70ea21744b342cb105ea3400

Modified Files
--------------
doc/src/sgml/ref/alter_tablespace.sgml    |   59 +++++++++-
src/backend/commands/tablespace.c         |  171 +++++++++++++++++++++++++++++
src/backend/nodes/copyfuncs.c             |   15 +++
src/backend/nodes/equalfuncs.c            |   14 +++
src/backend/parser/gram.y                 |   46 +++++++-
src/backend/tcop/utility.c                |   14 +++
src/include/commands/tablespace.h         |    1 +
src/include/nodes/nodes.h                 |    1 +
src/include/nodes/parsenodes.h            |   10 ++
src/include/parser/kwlist.h               |    1 +
src/test/regress/input/tablespace.source  |    7 +-
src/test/regress/output/tablespace.source |    8 +-
src/tools/pgindent/typedefs.list          |    1 +
13 files changed, 340 insertions(+), 8 deletions(-)