cockroachdb / cockroachdb/cockroach
sql: typechecking values clauses with tuples containing nulls is inconsistent with Postgres
Open
A-sql-pgcompat
A-sql-typing
C-bug
T-sql-queries
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
The following expression fails to typecheck in CockroachDB, but succeeds in Postgres:
`VALUES((1, 2)), ((1, NULL))`
CockroachDB:
```
demo@127.0.0.1:26257/defaultdb> values((1, 2)), ((1, null));
ERROR: VALUES types tuple{int, unknown} and tuple{int, int} cannot be matched
SQLSTATE: 42804
```
Postgres:
```
jordan=> values((1, 2)), ((1, null));
column1
---------
(1,2)
(1,)
(2 rows)
```
Jira issue: CRDB-22279
Contributor guide
Assessment
This issue has not been assessed yet.