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
In my pg_dump, I have this line, which isn't parseable by this library.
CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;
Running:
[nix-shell:~/dir]$ cargo run
Compiling sql2png v0.1.0 (/.../dir)
Finished dev [unoptimized + debuginfo] target(s) in 0.22s
Running `target/debug/sql2png`
AST: Err(ParserError("Expected an object type after CREATE, found: EXTENSION at Line: 23, Column 8"))
Code:
use sqlparser::dialect::PostgreSqlDialect;use sqlparser::parser::Parser;use std::fs;fnmain(){let dialect = PostgreSqlDialect{};// TODO:ARGSlet sql = fs::read_to_string("../something/out.sql").expect("File needs to exist");let ast = Parser::parse_sql(&dialect,&sql);println!("AST: {:?}", ast)}
The text was updated successfully, but these errors were encountered:
Thanks for the report @justinabrahms -- indeed it seems like the CREATE EXTENSION postgres syntax is not supported. It would be cool to add such support if anyone has time
In my
pg_dump
, I have this line, which isn't parseable by this library.Running:
Code:
The text was updated successfully, but these errors were encountered: