Skip to content

Commit dec899f

Browse files
Drop unreachable error path in CREATE USER MAPPING dispatch
1 parent a28736d commit dec899f

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎src/parser/mod.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5535,7 +5535,8 @@ impl<'a> Parser<'a> {
55355535
modifier_loc
55365536
);
55375537
}
5538-
self.expect_keywords(&[Keyword::USER, Keyword::MAPPING])?;
5538+
self.advance_token(); // USER
5539+
self.advance_token(); // MAPPING
55395540
self.parse_create_user_mapping().map(Into::into)
55405541
} else if self.parse_keyword(Keyword::USER) {
55415542
self.parse_create_user(or_replace).map(Into::into)

‎tests/sqlparser_postgres.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11928,6 +11928,10 @@ fn parse_create_user_mapping() {
1192811928
"CREATE USER MAPPING FOR app",
1192911929
"Expected: SERVER, found: EOF",
1193011930
),
11931+
(
11932+
"CREATE USER MAPPING FOR",
11933+
"Expected: identifier, found: EOF",
11934+
),
1193111935
(
1193211936
"CREATE USER MAPPING FOR app SERVER",
1193311937
"Expected: identifier, found: EOF",

0 commit comments

Comments
 (0)