cockroachdb / cockroachdb/cockroach

QA: cannot create view with COALESCE(table.*) expression

Open
#99,006 0 comments 0 reactions 0 assignees View on GitHub
C-bug O-qa S-3 T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

From [star expressions in view definitions QA](https://gist.github.com/msirek/f8a9d1515244043088ec44d00accbe99),

The following view with a star expression in COALESCE works on Postgres, but not on CRDB:
```sql
CREATE TABLE strings (a text, b text, c text, d text);
CREATE OR REPLACE VIEW stars (star_cols) AS SELECT COALESCE(strings.*) AS star_cols FROM strings;
ERROR: cannot use anonymous record type as table column
SQLSTATE: 42P16
```

Jira issue: CRDB-25651

Contributor guide

Open the contributing guide

Research direction

Reproduce the CREATE TABLE and CREATE OR REPLACE VIEW statements from the issue in CockroachDB and PostgreSQL, then trace the view-definition handling for COALESCE(strings.*). Done means the CockroachDB statement succeeds with the expected view column behavior and relevant SQL tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.