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: ban alter column type on view-depended cols #56213

Merged
merged 1 commit into from
Nov 3, 2020

Conversation

jordanlewis
Copy link
Member

Previously, it was legal to edit the column type of columns that were
depended on by views. This is not a good idea for various reasons, and
is not Postgres compatible to boot.

Now, it is illegal to alter the column type of columns that are depended
on views.

Closes #56166.

Release note (sql change): prevent column type modification of columns
that are depended on by views.

@jordanlewis jordanlewis requested review from thoszhang and a team November 2, 2020 20:19
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@thoszhang thoszhang left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

Previously, it was legal to edit the column type of columns that were
depended on by views. This is not a good idea for various reasons, and
is not Postgres compatible to boot.

Now, it is illegal to alter the column type of columns that are depended
on views.

Release note (sql change): prevent column type modification of columns
that are depended on by views.
@jordanlewis
Copy link
Member Author

Thanks for the reviews!

bors r+

@craig
Copy link
Contributor

craig bot commented Nov 3, 2020

Build failed:

@yuzefovich
Copy link
Member

Failed due to flaky test that should be fixed by #56265, courtesy borsing.

bors r+

@craig
Copy link
Contributor

craig bot commented Nov 3, 2020

Build succeeded:

@craig craig bot merged commit e05508b into cockroachdb:master Nov 3, 2020
@jordanlewis jordanlewis deleted the act-views branch November 6, 2020 14:46
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.

sql: REFRESH MATERIALIZED VIEW encounters error if underlying data types change
5 participants