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
use sqlparser::dialect::PostgreSqlDialect;use sqlparser::parser::Parser;fnmain(){let sql = "-- auto-generated definition alter table my_table owner to my_user";let dialect = PostgreSqlDialect{};// or AnsiDialect, or your own dialect ...let ast = Parser::parse_sql(&dialect, sql).unwrap();println!("AST: {:?}", ast);}
thread 'main' panicked at src/main.rs:11:48:
called `Result::unwrap()` on an `Err` value: ParserError("Expected ADD, RENAME, PARTITION, SWAP, DROP, or SET TBLPROPERTIES after ALTER TABLE, found: owner at Line: 2, Column 26")
stack backtrace:
0: rust_begin_unwind
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
2: core::result::unwrap_failed
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1653:5
3: core::result::Result<T,E>::unwrap
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1077:23
4: sqlreviewer::main
at ./src/main.rs:11:15
5: core::ops::function::FnOnce::call_once
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Process finished with exit code 101
The text was updated successfully, but these errors were encountered:
Version
sqlparser = "0.46.0"
https://www.postgresql.org/docs/16/sql-altertable.html
The text was updated successfully, but these errors were encountered: