Merge branch '1.0'

This commit is contained in:
Alexey Kopytov
2017-11-14 11:39:30 +03:00

View File

@ -531,7 +531,8 @@ static db_error_t pgsql_check_status(db_conn_t *con, PGresult *pgres,
con->sql_errmsg = strdup(PQresultErrorField(pgres, PG_DIAG_MESSAGE_PRIMARY));
if (!strcmp(con->sql_state, "40P01") /* deadlock_detected */ ||
!strcmp(con->sql_state, "23505") /* unique violation */)
!strcmp(con->sql_state, "23505") /* unique violation */ ||
!strcmp(con->sql_state, "40001"))/* serialization_failure */
{
PGresult *tmp;
tmp = PQexec(pgcon, "ROLLBACK");