Skip to content

Support for Postgres END semantics #1034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tobyhede opened this issue Nov 2, 2023 · 0 comments
Closed

Support for Postgres END semantics #1034

tobyhede opened this issue Nov 2, 2023 · 0 comments

Comments

@tobyhede
Copy link
Contributor

tobyhede commented Nov 2, 2023

I've run into an interesting conundrum.

In PostgreSQL, END is a synonym for COMMIT.
END is currently not supported. Parsing an END statement returns nothing.

One wrinkle is that Keyword::END is used as a statement delimiter in parse_statements.

Token::Word(word) if word.keyword == Keyword::END => break,

https://github.com/sqlparser-rs/sqlparser-rs/blob/main/src/parser/mod.rs#L423

I am attempting to add support for the Postgres END/COMMIT semantics.
The logic is quite simple, but END is never parsed because the break is hit first.

A bit lost as to how to approach changing this logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant