Add support for SQLSTATE error codes
authorAndras Mantia <andras@kdab.com>
Sun, 1 Jul 2012 14:11:00 +0000 (17:11 +0300)
committerQt by Nokia <qt-info@nokia.com>
Tue, 3 Jul 2012 11:21:23 +0000 (13:21 +0200)
commit8ccab9b029ed2a2444d89a9cfc6c4a1866b8e82d
tree9e359c5e77d30a0ca7761f05d91e85b46b954058
parentf128c1f6d3cbdc1aa13f9ec65fd2354ef91c1c48
Add support for SQLSTATE error codes

Postgres can report detailed information about an error using error codes.
See http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html .
The current driver doesn't report the error, nor is it supported by the
QSqlError object.
The patch appends the error to the error message, helping applications to:
- handle different errors in a specific way
- show correct, translated error messages, independently on the language of the postgres installation

Change-Id: Ica3530ac33d3aaa9985e06f6c1f302ece9891033
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
dist/changes-5.0.0
src/sql/drivers/psql/qsql_psql.cpp