cockroachdb / cockroachdb/cockroach

sql: fix type length for record, void, and unknown types in pg_catalog.pg_type

Open
#117,597 0 comments 0 reactions 0 assignees View on GitHub
A-sql-pgcompat C-bug E-quick-win O-pg-regress P-3 T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

In postgres, the types `unknown`, `record`, and `void` have the following lengths:

```
select typname,typlen from pg_type where typname='void' or typname='record' or typname='unknown';
typname | typlen
---------+--------
unknown | -2
record | -1
void | 4
```

But in CRDB these all have typlen 0:
```
select typname,typlen from pg_type where typname='void' or typname='record' or typname='unknown';

typname | typlen
----------+---------
record | 0
void | 0
unknown | 0
```

These should be the same as postgres.

Found in pg_regress type_sanity

Jira issue: CRDB-35260

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.