Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: tables with an interleaved child cannot be DROPed without CASCADE #8036

Closed
danhhz opened this issue Jul 26, 2016 · 4 comments
Closed

sql: tables with an interleaved child cannot be DROPed without CASCADE #8036

danhhz opened this issue Jul 26, 2016 · 4 comments
Labels
A-schema-changes A-sql-semantics C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.

Comments

@danhhz
Copy link
Contributor

danhhz commented Jul 26, 2016

Given

CREATE TABLE t1 (i INT PRIMARY KEY)
CREATE TABLE t2 (i INT, s STRING, PRIMARY KEY(i, s)) INTERLEAVE IN PARENT t1

Then DROP TABLE t1 will not (yet) work but DROP TABLE t1 CASCADE will.

There is some trickiness to doing this and it doesn't seem particularly necessary, so I'm going to leave it (but link this issue in the error) until there's sufficient interest. Please weigh in on this issue if this is affecting you.

// TODO(dan): It's possible to DROP a table that has a child interleave, but
// some loose ends would have to be addresssed. The zone would have to be
// kept and deleted when the last table in it is removed. Also, the dropped
// table's descriptor would have to be kept around in some Dropped but
// non-public state for referential integrity of the `InterleaveDescriptor`
// pointers.
@danhhz danhhz added this to the Later milestone Jul 26, 2016
@danhhz danhhz changed the title sql: tables with an interleaved child cannot be dropped sql: tables with an interleaved child cannot be DROPed without CASCADE Jul 26, 2016
@knz knz added S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-sql-semantics labels Oct 27, 2016
@jordanlewis
Copy link
Member

This doesn't really seem like a ux-surprise to me - so removing that label. It makes sense to me that you'd not be able to delete a parent table without CASCADE - there's an explicit relationship from the child and the parent! And CASCADE is designed to permit drops through those relationships.

@jordanlewis jordanlewis removed the S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption. label Dec 18, 2017
@knz knz added the S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption. label Apr 27, 2018
@petermattis petermattis removed this from the Later milestone Oct 5, 2018
@awoods187
Copy link
Contributor

awoods187 commented Oct 30, 2018

Top requested feature as evidenced by telemetry

@jordanlewis
Copy link
Member

What do you mean by "Top requested telemetry feature"?

@jordanlewis
Copy link
Member

@awoods187 unless you can justify that I'm going to close this as wont fix, it doesn't seem important to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-schema-changes A-sql-semantics C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.
Projects
None yet
Development

No branches or pull requests

7 participants