forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scbuild: support DROP TYPE ... CASCADE
Recently, we've added support for constraint removal in the declarative schema changer. This now makes it possible to support DROP TYPE ... CASCADE statements. As a result, DROP OWNED BY now also performs correctly when user-defined types are involved and no longer returns an error. This commit also extends the coverage of the declarative schema changer's ALTER TABLE ... DROP COLUMN support, which no longer punts to the legacy schema changer when the column to drop is referenced in a constraint. Now, the constraint gets dropped. The declarative schema changer still differs from Postgres behaviour when the column to drop is part of the primary key. Whereas postgres happily removes the primary key constraint and the column, CRDB is unable to do so straigtforwardly. What to do here remains an open question, there are many possible solutions, in the meantime we return an error. Fixes cockroachdb#51480. Fixes cockroachdb#55908. Release note (sql change): DROP TYPE ... CASCADE is now supported and no longer returns an error. Consequently DROP OWNED BY no longer returns an error when it tries to drop a type in a cascading manner.
- Loading branch information
Marius Posta
committed
Feb 4, 2023
1 parent
5fbcd8a
commit 1d84a91
Showing
52 changed files
with
9,799 additions
and
1,215 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.