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: check FK back-references in ALTER COLUMN TYPE #71718

Closed
wants to merge 1 commit into from

Conversation

postamar
Copy link
Contributor

Previously, ALTER TABLE ... ALTER COLUMN ... TYPE ... statements would
execute regardless if the column is also the target of a foreign key
constraint on another table. This commit fixes this bug.

Fixes #71709.

Release note (bug fix): fixes a bug in which an ALTER TABLE ... ALTER
COLUMN ... TYPE ... statement could execute despite the column being the
target of a foreign key constraint on another table.

Previously, ALTER TABLE ... ALTER COLUMN ... TYPE ... statements would
execute regardless if the column is also the target of a foreign key
constraint on another table. This commit fixes this bug.

Fixes cockroachdb#71709.

Release note (bug fix): fixes a bug in which an ALTER TABLE ... ALTER
COLUMN ... TYPE ... statement could execute despite the column being the
target of a foreign key constraint on another table.
@postamar postamar requested a review from RichardJCai October 19, 2021 17:08
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@postamar
Copy link
Contributor Author

This is wrong.

@postamar postamar closed this Oct 19, 2021
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: pg_catalog.pg_constraint broken after swapping PK and altering column type
2 participants