Better Vertica syntax error return messages please!

ehaavindbermanehaavindberman Registered User

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?

Comments

  • Jim_KnicelyJim_Knicely Administrator, Moderator, Employee, Registered User, VerticaExpert
    edited June 12

    Does your query have line terminators? Ha. Those are elimiated by the parse (like ALL DBs).

  • ehaavindbermanehaavindberman Registered User

    Hey Jim, in fact I also use MySQL where line numbers ARE returned in syntax error messages.

  • Jim_KnicelyJim_Knicely Administrator, Moderator, Employee, Registered User, VerticaExpert

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

  • ehaavindbermanehaavindberman Registered User
    edited June 12

    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, Moderator, Employee, Registered User, VerticaExpert

    What client are you using?

  • ehaavindbermanehaavindberman Registered User

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

  • Jim_KnicelyJim_Knicely Administrator, Moderator, Employee, Registered User, VerticaExpert
    edited June 12

    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?

  • ehaavindbermanehaavindberman Registered User

    Thanks Jim, I hear you

Leave a Comment

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