cockroachdb / cockroachdb/cockroach

sql: allow alter table schema with view dependency

Open
#117,629 0 comments 0 reactions 0 assignees View on GitHub
A-schema-changes A-sql-pgcompat C-bug O-pg-regress T-sql-foundations
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

The following is allowed in postgres, but not CRDB:

```
create schema alter1;
create schema alter2;
create table alter1.t1(f1 int primary key, f2 int check (f2 > 0));
create view alter1.v1 as select * from alter1.t1;
alter table alter1.t1 set schema alter2; -- fails in CRDB
alter table alter1.v1 set schema alter2;
drop schema alter1;
```

Found in pg_regress alter_table.sql

Jira issue: CRDB-35281

Epic CRDB-60817

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.