dex/db/conn_postgres.go

16 lines
261 B
Go
Raw Normal View History

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
})
}