Skip to content

Parsing fails for postgres queries with CTE's that use MATERIALIZED keyword #1147

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
ReppCodes opened this issue Feb 28, 2024 · 2 comments
Closed

Comments

@ReppCodes
Copy link
Contributor

Hi! I'm seeing parsing failures for Postgres queries that use the MATERIALIZED keyword.

Minimal repro in the format of a sqlparser-rs test:

#[test]
fn parse_mat_cte() {
    let sql = r#"WITH cte AS MATERIALIZED ( select id from accounts ) select id from cte;"#;
    pg().verified_stmt(sql);

    let sql2 = r#"WITH cte AS NOT MATERIALIZED ( select id from accounts ) select id from cte;"#;
    pg().verified_stmt(sql2);
}

I tested this on two versions, including the latest:

sqlparser = "0.43.1"
# sqlparser = "0.36.1"
@ReppCodes
Copy link
Contributor Author

I've opened #1148 to address this issue.

@ReppCodes
Copy link
Contributor Author

This has been resolved by #1148

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