File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3629,6 +3629,7 @@ impl<'a> Parser<'a> {
3629
3629
] ) ;
3630
3630
3631
3631
if modifier != Some ( Keyword :: HIVEVAR ) && self . parse_keyword ( Keyword :: ROLE ) {
3632
+ let _ = self . consume_token ( & Token :: Eq ) || self . parse_keyword ( Keyword :: TO ) ;
3632
3633
let role_name = if self . parse_keyword ( Keyword :: NONE ) {
3633
3634
None
3634
3635
} else {
Original file line number Diff line number Diff line change @@ -960,7 +960,10 @@ fn parse_set_role() {
960
960
}
961
961
) ;
962
962
963
- let stmt = pg_and_generic ( ) . verified_stmt ( "SET LOCAL ROLE \" rolename\" " ) ;
963
+ let stmt = pg_and_generic ( ) . one_statement_parses_to (
964
+ "SET LOCAL ROLE = \" rolename\" " ,
965
+ "SET LOCAL ROLE \" rolename\" " ,
966
+ ) ;
964
967
assert_eq ! (
965
968
stmt,
966
969
Statement :: SetRole {
@@ -973,7 +976,8 @@ fn parse_set_role() {
973
976
}
974
977
) ;
975
978
976
- let stmt = pg_and_generic ( ) . verified_stmt ( "SET ROLE 'rolename'" ) ;
979
+ let stmt =
980
+ pg_and_generic ( ) . one_statement_parses_to ( "SET ROLE TO 'rolename'" , "SET ROLE 'rolename'" ) ;
977
981
assert_eq ! (
978
982
stmt,
979
983
Statement :: SetRole {
You can’t perform that action at this time.
0 commit comments