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.
sql: disallow adding column as primary key
Previously, the behavior of ALTER TABLE ... ADD COLUMN ... PRIMARY KEY was undefined. With the legacy schema changer, this statement would appear to succeed, but it would break the new schema changer. This commit changes this by returning an explicit error. In the future, we should support this statement if the table's primary key was originally the default rowid primary key (see cockroachdb#81449). Release note: None
- Loading branch information
Jason Chan
committed
Jun 9, 2022
1 parent
d9fd5bf
commit 7ce9b4f
Showing
3 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
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