You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, pgcat is using sqlparser-rs to parse user queries. That's taken us to where we are today, which is great. However, sqlparser-rs does not correctly parse all PostgreSQL queries. There are already some open PRs to fix the known issues (e.g., apache/datafusion-sqlparser-rs#1000 and apache/datafusion-sqlparser-rs#1002), but it's not going to be 100% PG compatible.
Describe the solution you'd like
The closest to PostgreSQL parser that we can get is to use the PostgreSQL parser itself :)
Here's the maintained (extracted) C library: libpg_query, and here's its port to Rust (by pganalyze): pg_query.rs
I wanted to ask for everyone's opinion (especially the main pgcat maintainers) about changing our SQL parser from sqlparser-rs to pg_query.rs. If I see enough support for this change, I can put-together a PR for it.
The text was updated successfully, but these errors were encountered:
I believe not only pg_query.rs is the most correct Postgres SQL parser but also it's faster than sqlparser. There is a draft PR by another contributor with that integration: #525
Is your feature request related to a problem? Please describe.
Currently,
pgcat
is using sqlparser-rs to parse user queries. That's taken us to where we are today, which is great. However, sqlparser-rs does not correctly parse all PostgreSQL queries. There are already some open PRs to fix the known issues (e.g., apache/datafusion-sqlparser-rs#1000 and apache/datafusion-sqlparser-rs#1002), but it's not going to be 100% PG compatible.Describe the solution you'd like
The closest to PostgreSQL parser that we can get is to use the PostgreSQL parser itself :)
Here's the maintained (extracted) C library: libpg_query, and here's its port to Rust (by
pganalyze
): pg_query.rsI wanted to ask for everyone's opinion (especially the main
pgcat
maintainers) about changing our SQL parser from sqlparser-rs to pg_query.rs. If I see enough support for this change, I can put-together a PR for it.The text was updated successfully, but these errors were encountered: