Skip to content

Support for Postgres END semantics #1034

Closed
@tobyhede

Description

@tobyhede

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions