Better Vertica syntax error return messages please!
Is it possible to return a line number in syntax error messages? Something like: Syntax error near "("
is completely unhelpful when I have 40+ open parentheses in a query.
I know you can get the cursor position of the error, so why not be able to count the new lines between the start of the doc and the cursor position?
0
Comments
Does your query have line terminators? Ha. Those are elimiated by the parse (like ALL DBs).
Hey Jim, in fact I also use MySQL where line numbers ARE returned in syntax error messages.
MySQL was developed by developers. Vertica is built to analyze data, not your SQL.
okay....but you need to write SQL to access the data and for debugging that SQL code it's pretty nice as a user to have helpful error messages
What client are you using?
SQLWorkbenchJ if that's what you mean? I don't get anything different using DbVisualizer either.
I can ask engineering about this. But u know Vertica is a fast analytic DB. You can't bloat the engine (i.e. Oracle)
Maybe the better solution is to run your SQL through a simple online checker?
Thanks Jim, I hear you
vsql does give line numbers for syntax errors. E.g.
ERROR 4856: Syntax error at or near "AS" at character 440
LINE 11: END, 0) AS ctr,
76: ^
Maybe you can use vsql for debugging a query.