We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is there a way to output the line number when it gives a syntax error?
For example, I get
note: Postgres failed to parse query: syntax error at or near "(" help: Modify your Postgres statement to use valid syntax.
it is hard to find which line the syntax error. comes from.
The text was updated successfully, but these errors were encountered:
Yeah definitely possible to add, the libpg_query-sys crate has:
#[repr(C)] #[derive(Debug, Copy, Clone)] pub struct PgQueryError { pub message: *mut ::std::os::raw::c_char, pub funcname: *mut ::std::os::raw::c_char, pub filename: *mut ::std::os::raw::c_char, pub lineno: ::std::os::raw::c_int, pub cursorpos: ::std::os::raw::c_int, pub context: *mut ::std::os::raw::c_char, }
but we only use the message field from it:
message
squawk/parser/src/parse.rs
Lines 26 to 27 in ca1f346
Sorry, something went wrong.
No branches or pull requests
Is there a way to output the line number when it gives a syntax error?
For example, I get
it is hard to find which line the syntax error. comes from.
The text was updated successfully, but these errors were encountered: