Skip to content

parser breaks on any semicolon inside a statement #91

@beanpuppy

Description

@beanpuppy

Taken from a comment I made in the query parser a while ago. I'll probably forget about it at some point if it's not documented here.

// TODO(bug): Using none_of(";") breaks on the first semicolon it encounters, even if that semicolon is inside:
// - String literals: 'text with ; in it'
// - Dollar-quoted strings: $$text with ; in it$$
// - Comments: -- comment with ; in it
// We need proper SQL token awareness to know if a semicolon is part of these constructs or if it's the actual query terminator.

The most robust solution is to use a proper parser like https://github.com/pganalyze/pg_query.rs, there could also be other things we replace chumsky with from it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    parserA provlem with sql parsing.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions