Thread: pgsql: Rework 'MOVE ALL' to 'ALTER .. ALL IN TABLESPACE'

pgsql: Rework 'MOVE ALL' to 'ALTER .. ALL IN TABLESPACE'

From
Stephen Frost
Date:
Rework 'MOVE ALL' to 'ALTER .. ALL IN TABLESPACE'

As 'ALTER TABLESPACE .. MOVE ALL' really didn't change the tablespace
but instead changed objects inside tablespaces, it made sense to
rework the syntax and supporting functions to operate under the
'ALTER (TABLE|INDEX|MATERIALIZED VIEW)' syntax and to be in
tablecmds.c.

Pointed out by Alvaro, who also suggested the new syntax.

Back-patch to 9.4.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3c4cf080879b386d4ed1814667aca025caafe608

Modified Files
--------------
doc/src/sgml/ref/alter_index.sgml             |   13 ++
doc/src/sgml/ref/alter_materialized_view.sgml |    2 +
doc/src/sgml/ref/alter_table.sgml             |   20 ++-
doc/src/sgml/ref/alter_tablespace.sgml        |   78 -----------
doc/src/sgml/release-9.4.sgml                 |    5 +-
src/backend/commands/tablecmds.c              |  171 +++++++++++++++++++++++
src/backend/commands/tablespace.c             |  179 -------------------------
src/backend/nodes/copyfuncs.c                 |   11 +-
src/backend/nodes/equalfuncs.c                |    9 +-
src/backend/parser/gram.y                     |  165 ++++++++++-------------
src/backend/tcop/utility.c                    |   20 ++-
src/include/commands/tablecmds.h              |    2 +
src/include/commands/tablespace.h             |    1 -
src/include/nodes/nodes.h                     |    2 +-
src/include/nodes/parsenodes.h                |    7 +-
src/test/regress/input/tablespace.source      |    5 +-
src/test/regress/output/tablespace.source     |    5 +-
src/tools/pgindent/typedefs.list              |    2 +-
18 files changed, 305 insertions(+), 392 deletions(-)


Re: pgsql: Rework 'MOVE ALL' to 'ALTER .. ALL IN TABLESPACE'

From
Thom Brown
Date:
On 22 August 2014 00:13, Stephen Frost <sfrost@snowman.net> wrote:
Rework 'MOVE ALL' to 'ALTER .. ALL IN TABLESPACE'

As 'ALTER TABLESPACE .. MOVE ALL' really didn't change the tablespace
but instead changed objects inside tablespaces, it made sense to
rework the syntax and supporting functions to operate under the
'ALTER (TABLE|INDEX|MATERIALIZED VIEW)' syntax and to be in
tablecmds.c.

Pointed out by Alvaro, who also suggested the new syntax.

Back-patch to 9.4.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3c4cf080879b386d4ed1814667aca025caafe608

Modified Files
--------------
doc/src/sgml/ref/alter_index.sgml             |   13 ++
doc/src/sgml/ref/alter_materialized_view.sgml |    2 +
doc/src/sgml/ref/alter_table.sgml             |   20 ++-
doc/src/sgml/ref/alter_tablespace.sgml        |   78 -----------

There's still some left-over text that wasn't reverted.  Patch attached to fix.
--
Thom
Attachment

Re: pgsql: Rework 'MOVE ALL' to 'ALTER .. ALL IN TABLESPACE'

From
Stephen Frost
Date:
* Thom Brown (thom@linux.com) wrote:
> There's still some left-over text that wasn't reverted.  Patch attached to
> fix.

Good catch, fix pushed, thanks!

    Stephen

Attachment