cockroachdb / cockroachdb/cockroach

sql: add support for (N) modifier for datatype bpchar

Open
#115,779 1 comment 1 reaction 0 assignees View on GitHub
A-sql-datatypes A-sql-pgcompat C-bug T-sql-foundations
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

The following throws an error with regards to `bpchar`.

```
create table t (b bpchar(1));
```

but it will work if I remove the N modifier

```
create table t (b bpchar);
```

[slack](https://cockroachlabs.slack.com/archives/C0168LW5THS/p1701796015283839)

Jira issue: CRDB-34207

Epic CRDB-60813

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with `create table t (b bpchar(1));` and compare it with the working `bpchar` form. Trace how the SQL parser and datatype handling process the `bpchar` modifier, then verify that the parameterized form succeeds without regressing the unparameterized form.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.