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: no longer require CASCADE for dropping a unique index created explicitly #42001

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

yuzefovich
Copy link
Member

Previously, all unique indexes needed 'CASCADE' to be dropped,
regardless of the way they were created. However, if the index is
created "explicitly" (i.e. via 'CREATE UNIQUE INDEX' statement),
we should be able to drop it without 'CASCADE'. This is what
Postgres does. Now this is we do as well.

Release note (sql change): dropping a unique index that was created
via 'CREATE UNIQUE INDEX' statement no longer requires 'CASCADE'
option.

@yuzefovich yuzefovich requested review from dt, maddyblue and a team October 29, 2019 18:16
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@yuzefovich yuzefovich changed the title sql: allow dropping a unique index created explicitly sql: no longer require CASCADE for dropping a unique index created explicitly Oct 29, 2019
…plicitly

Previously, all unique indexes needed 'CASCADE' to be dropped,
regardless of the way they were created. However, if the index is
created "explicitly" (i.e. via 'CREATE UNIQUE INDEX' statement),
we should be able to drop it without 'CASCADE'. This is what
Postgres does. Now this is we do as well.

Release note (sql change): dropping a unique index that was created
via 'CREATE UNIQUE INDEX' statement no longer requires 'CASCADE'
option.
@yuzefovich
Copy link
Member Author

TFTR!

bors r+

@yuzefovich
Copy link
Member Author

bors r-

@yuzefovich
Copy link
Member Author

bors r+

craig bot pushed a commit that referenced this pull request Oct 30, 2019
42001: sql: no longer require CASCADE for dropping a unique index created explicitly r=yuzefovich a=yuzefovich

Previously, all unique indexes needed 'CASCADE' to be dropped,
regardless of the way they were created. However, if the index is
created "explicitly" (i.e. via 'CREATE UNIQUE INDEX' statement),
we should be able to drop it without 'CASCADE'. This is what
Postgres does. Now this is we do as well.

Release note (sql change): dropping a unique index that was created
via 'CREATE UNIQUE INDEX' statement no longer requires 'CASCADE'
option.

Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Oct 30, 2019

Build succeeded

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

Successfully merging this pull request may close these issues.

None yet

3 participants