This commit is contained in:
jnlt3 2025-12-19 10:30:43 +03:00 committed by GitHub
commit 2d19bb755b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -12024,7 +12024,7 @@ impl<'a> Parser<'a> {
Token::Word(w) => {
idents.push(w.clone().into_ident(self.peek_token_ref().span));
}
Token::EOF | Token::Eq => break,
Token::EOF | Token::Eq | Token::SemiColon => break,
_ => {}
}
self.advance_token();

View file

@ -7914,3 +7914,11 @@ fn parse_create_operator_class() {
)
.is_err());
}
#[test]
fn parse_identifiers_semicolon_handling() {
let statement = "SHOW search_path; SELECT 1";
pg_and_generic().statements_parse_to(statement, statement);
let statement = "SHOW search_path; SHOW ALL; SHOW ALL";
pg_and_generic().statements_parse_to(statement, statement);
}