cockroachdb / cockroachdb/cockroach
Value too long error message should include column name
Open
C-enhancement
E-quick-win
O-community
T-sql-queries
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Is your feature request related to a problem? Please describe.**
In production we encountered this error and could not determine which column was too long for its defined limit.
To repro:
```
root@localhost:26257/defaultdb> create table toolong (v varchar(5));
CREATE TABLE
Time: 8ms total (execution 8ms / network 0ms)
root@localhost:26257/defaultdb> insert into toolong values ('123456');
ERROR: value too long for type VARCHAR(5)
SQLSTATE: 22001
```
**Describe the solution you'd like**
The error message should tell me the name of the column that exceeded the length limit, in this example "v"
Jira issue: CRDB-31249
Contributor guide
Assessment
This issue has not been assessed yet.