This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch gh-readonly-queue/main/pr-2137-14703f022fd8c5b5a58d3e23d3839d956c1b11ee in repository https://gitbox.apache.org/repos/asf/datafusion-sqlparser-rs.git
commit 0cf85d3b3d84596f4f773a2d23fbee2661fda23c Author: jnlt3 <[email protected]> AuthorDate: Tue Dec 30 17:15:24 2025 +0300 Fix parse_identifiers not taking semicolons into account (#2137) --- src/parser/mod.rs | 2 +- tests/sqlparser_postgres.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/parser/mod.rs b/src/parser/mod.rs index d1c4fe05..f07e8919 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -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(); diff --git a/tests/sqlparser_postgres.rs b/tests/sqlparser_postgres.rs index 9f4564ef..70f27a13 100644 --- a/tests/sqlparser_postgres.rs +++ b/tests/sqlparser_postgres.rs @@ -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); +} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
