]> granicus.if.org Git - postgresql/commitdiff
Move ALTER ... ALL IN to ProcessUtilitySlow
authorStephen Frost <sfrost@snowman.net>
Tue, 9 Sep 2014 14:52:10 +0000 (10:52 -0400)
committerStephen Frost <sfrost@snowman.net>
Tue, 9 Sep 2014 14:58:48 +0000 (10:58 -0400)
Now that ALTER TABLE .. ALL IN TABLESPACE has replaced the previous
ALTER TABLESPACE approach, it makes sense to move the calls down in
to ProcessUtilitySlow where the rest of ALTER TABLE is handled.

This also means that event triggers will support ALTER TABLE .. ALL
(which was the impetus for the original change, though it has other
good qualities also).

Álvaro Herrera

Back-patch to 9.4 as the original rework was.

src/backend/tcop/utility.c

index 40ac47f5c2db3e9b09514d9f7e59f1d75e794952..e2c2d3d5589b0097ea1e9c9bbb8c561663dde72a 100644 (file)
@@ -507,10 +507,6 @@ standard_ProcessUtility(Node *parsetree,
                        AlterTableSpaceOptions((AlterTableSpaceOptionsStmt *) parsetree);
                        break;
 
-               case T_AlterTableMoveAllStmt:
-                       AlterTableMoveAll((AlterTableMoveAllStmt *) parsetree);
-                       break;
-
                case T_TruncateStmt:
                        ExecuteTruncate((TruncateStmt *) parsetree);
                        break;
@@ -1296,6 +1292,10 @@ ProcessUtilitySlow(Node *parsetree,
                                AlterTSConfiguration((AlterTSConfigurationStmt *) parsetree);
                                break;
 
+                       case T_AlterTableMoveAllStmt:
+                               AlterTableMoveAll((AlterTableMoveAllStmt *) parsetree);
+                               break;
+
                        case T_DropStmt:
                                ExecDropStmt((DropStmt *) parsetree, isTopLevel);
                                break;