This repository has been archived on 2022-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
dex/db/conn_postgres.go
2016-03-02 12:02:55 -08:00

15 lines
261 B
Go

package db
// Register the postgres driver.
import "github.com/lib/pq"
func init() {
registerAlreadyExistsChecker(func(err error) bool {
sqlErr, ok := err.(*pq.Error)
if !ok {
return false
}
return sqlErr.Code == pgErrorCodeUniqueViolation
})
}