8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 16:43:03 +01:00

Implemented CORE-6279: Put options in user management statements in any order

This commit is contained in:
AlexPeshkoff 2020-04-08 14:17:02 +03:00
parent bb5270fe34
commit 1e37604cd0
2 changed files with 7 additions and 15 deletions

View File

@ -1,4 +1,4 @@
SQL Language Extension: CREATE/ALTER/CREATE_OR_ALTER/DROP USER SQL Language Extension: CREATE/ALTER/CREATE_OR_ALTER/RECREATE/DROP USER
Implements capability to manage users from regular database attachment. Implements capability to manage users from regular database attachment.
@ -9,11 +9,11 @@ Author:
Syntax is: Syntax is:
CREATE USER name [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ] CREATE USER name [ options ];
ALTER USER name [ SET ] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ] ALTER USER name [ SET ] [ options ];
ALTER CURRENT USER [ SET ] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ] ALTER CURRENT USER [ SET ] [ options ];
CREATE OR ALTER USER name [ SET ] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ] CREATE OR ALTER USER name [ SET ] [ options ];
RECREATE USER name [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ] RECREATE USER name [ options ];
DROP USER name [ USING PLUGIN name ]; DROP USER name [ USING PLUGIN name ];
where OPTIONS is a list of following options: where OPTIONS is a list of following options:
@ -24,6 +24,7 @@ where OPTIONS is a list of following options:
- ACTIVE - ACTIVE
- INACTIVE - INACTIVE
- USING PLUGIN name - USING PLUGIN name
- TAGS ( tag [, tag [, tag ...]] )
and each TAG may have one of two forms: and each TAG may have one of two forms:
name = 'string value' name = 'string value'

View File

@ -6999,7 +6999,6 @@ create_user_clause
$$ = newNode<CreateAlterUserNode>(CreateAlterUserNode::USER_ADD, *$1); $$ = newNode<CreateAlterUserNode>(CreateAlterUserNode::USER_ADD, *$1);
} }
user_fixed_list_opt($2) user_fixed_list_opt($2)
user_var_opts($2)
{ {
$$ = $2; $$ = $2;
} }
@ -7012,7 +7011,6 @@ alter_user_clause
$$ = newNode<CreateAlterUserNode>(CreateAlterUserNode::USER_MOD, *$1); $$ = newNode<CreateAlterUserNode>(CreateAlterUserNode::USER_MOD, *$1);
} }
user_fixed_list_opt($3) user_fixed_list_opt($3)
user_var_opts($3)
{ {
$$ = $3; $$ = $3;
} }
@ -7025,7 +7023,6 @@ alter_cur_user_clause
$$ = newNode<CreateAlterUserNode>(CreateAlterUserNode::USER_MOD, ""); $$ = newNode<CreateAlterUserNode>(CreateAlterUserNode::USER_MOD, "");
} }
user_fixed_list_opt($2) user_fixed_list_opt($2)
user_var_opts($2)
{ {
$$ = $2; $$ = $2;
} }
@ -7038,7 +7035,6 @@ replace_user_clause
$$ = newNode<CreateAlterUserNode>(CreateAlterUserNode::USER_RPL, *$1); $$ = newNode<CreateAlterUserNode>(CreateAlterUserNode::USER_RPL, *$1);
} }
user_fixed_list_opt($3) user_fixed_list_opt($3)
user_var_opts($3)
{ {
$$ = $3; $$ = $3;
} }
@ -7073,11 +7069,6 @@ user_fixed_option($node)
| INACTIVE { setClause($node->active, "ACTIVE/INACTIVE", false); } | INACTIVE { setClause($node->active, "ACTIVE/INACTIVE", false); }
| USING PLUGIN valid_symbol_name | USING PLUGIN valid_symbol_name
{ setClause($node->plugin, "USING PLUGIN", $3); } { setClause($node->plugin, "USING PLUGIN", $3); }
;
%type user_var_opts(<createAlterUserNode>)
user_var_opts($node)
: // nothing
| TAGS '(' user_var_list($node) ')' | TAGS '(' user_var_list($node) ')'
; ;