-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: views do not track fine-grained dependencies #29021
Copy link
Copy link
Closed
Labels
A-schema-descriptorsRelating to SQL table/db descriptor handling.Relating 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.Code 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, docsWould prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs
Milestone
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-schema-descriptorsRelating to SQL table/db descriptor handling.Relating 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.Code 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, docsWould prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs