We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a30372f commit 2f9b8e5Copy full SHA for 2f9b8e5
sql/codes.go
@@ -9,7 +9,7 @@ import (
9
func IsUniqueViolationError(err error) (bool, string) {
10
var pqErr *pgconn.PgError
11
if errors.As(err, &pqErr) && pqErr.Code == UniqueViolationCode {
12
- return true, pqErr.ColumnName
+ return true, pqErr.ConstraintName
13
}
14
return false, ""
15
0 commit comments