cockroachdb / cockroachdb/cockroach

Value too long error message should include column name

Open
#110,058 1 comment 3 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.