Vertica Error Messages
Welcome to the Vertica Error Codes guide. This guide is mainly for developers who need to understand how Vertica's error codes relate to error states returned by the ODBC and JDBC drivers.
The Different Ways Vertica Reports Errors
Vertica reports warnings and errors via two different mechanisms: SQLSTATEs and error messages. SQLSTATEs are intended for use by client applications, such as those accessing Vertica via ODBC or JDBC. Error messages are displayed to interactive users (for example, users connected to Vertica through vsql) and written to error logs.
Vertica reports the success or failure of each statement it executes to client applications using a five-character SQLSTATE value. Many of these values are defined by the SQL standard. Others (identified by the letter "V" in their values) are Vertica-specific.
SQLSTATE values are grouped into classes which are defined by the first two characters in the SQLSTATE value. The last three characters indicate a specific condition within a class. For example, the SQLSTATE class 22 represents all data errors. The specific SQLSTATE value 22012 represents a division by zero error. SQLSTATE classes let an application that does not recognize a specific SQLSTATE value to still get a general idea of the result.
Warning and Error Messages
Each error and warning message displayed to interactive users or written to a log file by Vertica has its own numeric error code assigned to it. For example:
ERROR 3117: Division by zero WARNING 4098: No projections found ERROR 5617: Multiple WITH clauses not allowed
The error code number is not related to the SQLSTATE value. However, error and warning messages do correspond to a specific SQLSTATE. They are just a more-specific human-readable message compared to the SQLSTATE, which is mainly intended for client applications.
For example, all warning messages displayed by Vertica correspond to the SQLSTATE class 01. The warning message
"WARNING 3084: Design Workspace couldn't be dropped" corresponds to the SQLSTATE value 01000 ERRCODE_WARNING.
Error codes do not change between Vertica releases, but individual error and warning messages may be added or removed in new releases. Your client application should not depend on particular error code appearing from one release to the next. Instead, it should use the SQLSTATE value to determine the result of executing a statement.
See the SQL State List for a list of all the SQLSTATE classes and values defined by Vertica. This table also links to lists of error or warning messages that are associated with each SQLSTATE value.