Fix calls to error_unsupported_command()
authorIan Barwick <ian@2ndquadrant.com>
Mon, 13 Jul 2015 08:19:35 +0000 (17:19 +0900)
committerIan Barwick <ian@2ndquadrant.com>
Mon, 13 Jul 2015 08:23:10 +0000 (17:23 +0900)
Otherwise ambiguous things like this happen:

$ ALTER EXTENSION bdr UPDATE;
ERROR:   is not supported when bdr is active

This is what we want, of course:

$ ALTER EXTENSION bdr UPDATE;
ERROR:  ALTER EXTENSION is not supported when bdr is active

bdr_commandfilter.c

index 240ca09006f95a411743c28116398197463120a1..99064591cbb8c335db39aa7652c5c5e855050355 100644 (file)
@@ -815,11 +815,11 @@ bdr_commandfilter(Node *parsetree,
 
        case T_AlterExtensionStmt:
            /* XXX: we could support some of these */
-           error_unsupported_command(completionTag);
+           error_unsupported_command(CreateCommandTag(parsetree));
            break;
 
        case T_AlterExtensionContentsStmt:
-           error_unsupported_command(completionTag);
+           error_unsupported_command(CreateCommandTag(parsetree));
            break;
 
        case T_CreateFdwStmt:
@@ -830,7 +830,7 @@ bdr_commandfilter(Node *parsetree,
        case T_AlterUserMappingStmt:
        case T_DropUserMappingStmt:
            /* XXX: we should probably support all of these at some point */
-           error_unsupported_command(completionTag);
+           error_unsupported_command(CreateCommandTag(parsetree));
            break;
 
        case T_CompositeTypeStmt:   /* CREATE TYPE (composite) */
@@ -859,14 +859,14 @@ bdr_commandfilter(Node *parsetree,
 
        case T_RefreshMatViewStmt:
            /* XXX: might make sense to support or not */
-           error_unsupported_command(completionTag);
+           error_unsupported_command(CreateCommandTag(parsetree));
            break;
 
        case T_CreateTrigStmt:
            break;
 
        case T_CreatePLangStmt:
-           error_unsupported_command(completionTag);
+           error_unsupported_command(CreateCommandTag(parsetree));
            break;
 
        case T_CreateDomainStmt: