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: block FKs to/from TTL tables #76409

Merged
merged 1 commit into from
Feb 15, 2022
Merged

Conversation

otan
Copy link
Contributor

@otan otan commented Feb 11, 2022

This table blocks FKs to and from TTL tables. Note the RFC previously
only said to, but I actually thought of a new case and decided that is
was probably prudent to block this both ways. RFC is reflected
accordingly.

Release note: None

@otan otan requested a review from rafiss February 11, 2022 00:04
@otan otan self-assigned this Feb 11, 2022
@otan otan requested a review from a team February 11, 2022 00:04
@otan otan requested a review from a team as a code owner February 11, 2022 00:04
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@otan otan mentioned this pull request Feb 11, 2022
30 tasks
@otan otan removed their assignment Feb 11, 2022
Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

though similar to my comment on the other PR, have we already considered blocking computed columns and partial index defs? (this would be for a future PR)

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @otan and @rafiss)


-- commits, line 5 at r1:
nit: missed phrasing after "only said to"

This table blocks FKs to and from TTL tables. Note the RFC previously
only said to not block from TTL tables, but I actually thought of a
new case and decided that is was probably prudent to block this both
ways. RFC is reflected accordingly.

Release note: None
@otan
Copy link
Contributor Author

otan commented Feb 15, 2022

have we already considered blocking computed columns and partial index defs?

i think we're ok here since:
(a) dropColumn knows how to handle if these exist
(b) with strict filtering these can be ignored, similar to a normal table lookup

TFTR!
bors r+

@rafiss
Copy link
Collaborator

rafiss commented Feb 15, 2022

i guess it's an even more general question - do computed columns and partial index defs already play nice with DEFAULT/ON UPDATE columns? i think we might have an issue for that somewhere actually..

@craig craig bot merged commit 1452123 into cockroachdb:master Feb 15, 2022
@craig
Copy link
Contributor

craig bot commented Feb 15, 2022

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants