Error codes (sqlstate) missing in QueryError
brstgt opened this issue · comments
Benjamin Roth commented
To handle a query error properly, it is necessary what kind of error this is. Working on an error message is not viable. PG offers the SQLSTATE for that. The QueryError could be extended to contain the SQLSTATE and even more diagnostic information.
PQ offers that information in the 'diag' field of the result, pgsql offers this through pg_result_error_field. QueryError should provide a common interface for that.
Aaron Piotrowski commented
Something like ac11c55?