Fix calls to error_unsupported_command()
authorIan Barwick <[email protected]>
Mon, 13 Jul 2015 08:19:35 +0000 (17:19 +0900)
committerIan Barwick <[email protected]>
Mon, 13 Jul 2015 08:19:35 +0000 (17:19 +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 988e845f6e364fd0083832f7dce532624ed483e7..a2e27e3c952e9e0157b97541a2e6e887b891d2e9 100644 (file)
@@ -919,11 +919,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:
@@ -934,7 +934,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) */
@@ -967,14 +967,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: