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: disallow adding OIDVECTOR and INT2VECTOR columns #61763

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

mgartner
Copy link
Collaborator

Creating columns of type OIDVECTOR or INT2VECTOR is not allowed in
CREATE TABLE statements. This commit disallows these types in
ALTER TABLE ... ADD COLUMN statements for consistency.

Fixes #61762

Release justification: This is a low-risk bug fix.

Release note (bug fix): Adding columns of type OIDVECTOR or
INT2VECTOR to a table in ALTER TABLE ... ADD COLUMN statements is no
longer allowed. These types are not allowed in user-created tables via
CREATE TABLE and were erroneously allowed previously in
ALTER TABLE ... ADD COLUMN.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@mgartner
Copy link
Collaborator Author

This will fail sqlsmith tests without #61761, so I thinking of only backporting to 21.1. But if we think there's benefit to backporting #61761's changes to 20.2 and 20.1, I could backport this too...

@mgartner mgartner force-pushed the disallow-oidvector-alter branch 2 times, most recently from 2a97bbe to cda2247 Compare March 16, 2021 17:04
@mgartner mgartner requested a review from rytaft March 16, 2021 17:05
Copy link
Collaborator

@rytaft rytaft left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @RaduBerinde)

Creating columns of type `OIDVECTOR` or `INT2VECTOR` is not allowed in
`CREATE TABLE` statements. This commit disallows these types in
`ALTER TABLE ... ADD COLUMN` statements for consistency.

Fixes cockroachdb#61762

Release justification: This is a low-risk bug fix.

Release note (bug fix): Adding columns of type `OIDVECTOR` or
`INT2VECTOR` to a table in `ALTER TABLE ... ADD COLUMN` statements is no
longer allowed. These types are not allowed in user-created tables via
`CREATE TABLE ` and were erroneously allowed previously in
`ALTER TABLE ... ADD COLUMN`.
@mgartner
Copy link
Collaborator Author

TFTR

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 17, 2021

Build succeeded:

@craig craig bot merged commit 2c5a676 into cockroachdb:master Mar 17, 2021
@mgartner mgartner deleted the disallow-oidvector-alter branch March 22, 2021 17:54
@rafiss rafiss added this to the 21.1 milestone Apr 22, 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: disallow adding OIDVECTOR and INT2VECTOR columns
4 participants