The ALTER TABLESPACE MOVE command affects tables, not tablespaces; and as such, I think event triggers should support that command. I'm not proposing to change event triggers at this stage, but since IMO we will want to do that in 9.5, we need it to have a different command tag than plain ALTER TABLESPACE. This is so that check_ddl_tag() can compare the tag with ALTER TABLESPACE and say "unsupported", and ALTER TABLESPACE MOVE and say "supported". Both are currently spelled the same, which will be a problem.
Therefore I propose the attached patch for 9.4. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 3423898..5553221 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -1806,7 +1805,7 @@ CreateCommandTag(Node *parsetree) break; case T_AlterTableSpaceMoveStmt: - tag = "ALTER TABLESPACE"; + tag = "ALTER TABLESPACE MOVE"; break; case T_CreateExtensionStmt:
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers