Skip to content

Commit dbab394

Browse files
Drop unreachable error path in CREATE USER MAPPING dispatch
1 parent b1f214d commit dbab394

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
@@ -11840,6 +11840,10 @@ fn parse_create_user_mapping() {
1184011840
"CREATE USER MAPPING FOR app",
1184111841
"Expected: SERVER, found: EOF",
1184211842
),
11843+
(
11844+
"CREATE USER MAPPING FOR",
11845+
"Expected: identifier, found: EOF",
11846+
),
1184311847
(
1184411848
"CREATE USER MAPPING FOR app SERVER",
1184511849
"Expected: identifier, found: EOF",

0 commit comments

Comments
 (0)