Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

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?


  • Jim_KnicelyJim_Knicely Administrator
    edited June 2019

    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.

  • Jim_KnicelyJim_Knicely Administrator

    MySQL was developed by developers. Vertica is built to analyze data, not your SQL.

  • edited June 2019

    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

  • Jim_KnicelyJim_Knicely Administrator

    What client are you using?

  • SQLWorkbenchJ if that's what you mean? I don't get anything different using DbVisualizer either.

  • Jim_KnicelyJim_Knicely Administrator
    edited June 2019

    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.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.