postgresql-parser icon indicating copy to clipboard operation
postgresql-parser copied to clipboard

Parser Better Error Handling

Open kefniark opened this issue 1 year ago • 0 comments

Description

Right now when the parser fail with an unknown syntax, the error is really minimal, which to debug on a mid/big size schema is near impossible. Is there a way to get more information out of this error like the line number ?

stmts, err := parser.Parse(sql)
if err != nil {
    return err
}
Error: at or near "(": syntax error

kefniark avatar Aug 28 '24 08:08 kefniark