This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: fix NewUniquenessConstraintViolationError reporting
Release note (bug fix): If NewUniquenessConstraintViolationError cannot initialize a row fetcher it will only report this error to the client without wrappibng it with information about the actual constraint violation which can be confusing. Old error: `ERROR: column-id "2" does not exist` New Error: ``` ERROR: duplicate key value (b)=(couldn't fetch value: column-id "2" does not exist) violates unique constraint "t_secondary" ``` See cockroachdb#46276.
- Loading branch information