Commit aa068b66 authored by Alex Suraci's avatar Alex Suraci

postgres: improve readability of error check

parent 9b9013a5
......@@ -71,7 +71,7 @@ var (
err = tx.Commit()
if err != nil {
if pqErr, ok := err.(*pq.Error); ok && pqErr.Code == "40001" {
if pqErr, ok := err.(*pq.Error); ok && pqErr.Code.Name() == "serialization_failure" {
// serialization error; retry
continue
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment