summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorStephen Frost2014-08-21 23:06:17 +0000
committerStephen Frost2014-08-21 23:12:00 +0000
commitd9b2bc45cf75f913490f1b3ce9b9263509b26704 (patch)
tree5245060be317d1a40da7398838b8e9bc5dd7751c /src/include/nodes
parent9243417801be3f1cfaa3a3c33d5a003f382bd7a4 (diff)
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.
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/nodes.h2
-rw-r--r--src/include/nodes/parsenodes.h7
2 files changed, 4 insertions, 5 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index bc58e165258..5dcc66f27ff 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -354,7 +354,7 @@ typedef enum NodeTag
T_AlterUserMappingStmt,
T_DropUserMappingStmt,
T_AlterTableSpaceOptionsStmt,
- T_AlterTableSpaceMoveStmt,
+ T_AlterTableMoveAllStmt,
T_SecLabelStmt,
T_CreateForeignTableStmt,
T_CreateExtensionStmt,
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 7e560a19a3b..3146aa53ed1 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -1689,16 +1689,15 @@ typedef struct AlterTableSpaceOptionsStmt
bool isReset;
} AlterTableSpaceOptionsStmt;
-typedef struct AlterTableSpaceMoveStmt
+typedef struct AlterTableMoveAllStmt
{
NodeTag type;
char *orig_tablespacename;
- ObjectType objtype; /* set to -1 if move_all is true */
- bool move_all; /* move all, or just objtype objects? */
+ ObjectType objtype; /* Object type to move */
List *roles; /* List of roles to move objects of */
char *new_tablespacename;
bool nowait;
-} AlterTableSpaceMoveStmt;
+} AlterTableMoveAllStmt;
/* ----------------------
* Create/Alter Extension Statements