Skip to content

Commit 64fe4cc

Browse files
Drop unreachable error path in CREATE USER MAPPING dispatch
1 parent 71dfbd7 commit 64fe4cc

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
@@ -12075,6 +12075,10 @@ fn parse_create_user_mapping() {
1207512075
"CREATE USER MAPPING FOR app",
1207612076
"Expected: SERVER, found: EOF",
1207712077
),
12078+
(
12079+
"CREATE USER MAPPING FOR",
12080+
"Expected: identifier, found: EOF",
12081+
),
1207812082
(
1207912083
"CREATE USER MAPPING FOR app SERVER",
1208012084
"Expected: identifier, found: EOF",

0 commit comments

Comments
 (0)