Skip to content

sql: views do not track fine-grained dependencies #29021

@knz

Description

@knz
CREATE TABLE t (a INT PRIMARY KEY, b BOOLEAN DEFAULT FALSE);
CREATE VIEW v AS SELECT a from t;
ALTER TABLE t DROP COLUMN b;

says

pq: cannot drop column "b" because view "v" depends on it

This is a result of #17280 because our previous attempt at being fine-grained was erroneous. However the result errs on the other side of the UX inconvenience.

There should be a middle ground that looks just as those columns actually mentioned in the view query.

Metadata

Metadata

Assignees

Labels

A-schema-descriptorsRelating to SQL table/db descriptor handling.A-sql-semanticsC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-supportWould prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions