diff --git a/pkg/sql/alter_table.go b/pkg/sql/alter_table.go index 02034c8d1acc..07bd58ea400d 100644 --- a/pkg/sql/alter_table.go +++ b/pkg/sql/alter_table.go @@ -1613,7 +1613,7 @@ func validateConstraintNameIsNotUsed( if name == "" { return false, nil } - idx, _ := tableDesc.FindIndexWithName(name.String()) + idx, _ := tableDesc.FindIndexWithName(string(name)) if idx == nil { return false, nil }