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: relax validation for IDENTITY columns #139084

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented Jan 14, 2025

The validations added in 4f99f9c were
too strict. This patch makes it so we can continue having IDENTITY
columns that are not backed by a sequence. This can happen if a SERIAL
column is created with IDENTITY, and serial_normalization=rowid.

informs #138925
informs #138972

Release note (bug fix): Fixed a bug where columns created with GENERATED ... BY IDENTITY with the SERIAL type could incorrectly fail internal validations.

@rafiss rafiss added the backport-24.3.x Flags PRs that need to be backported to 24.3 label Jan 14, 2025
@rafiss rafiss requested a review from fqazi January 14, 2025 23:35
@rafiss rafiss requested a review from a team as a code owner January 14, 2025 23:35
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@fqazi fqazi left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this.

:lgtm:

Reviewed 2 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

The validations added in 4f99f9c were
too strict. This patch makes it so we can continue having IDENTITY
columns that are not backed by a sequence. This can happen if a SERIAL
column is created with IDENTITY, and serial_normalization=rowid.

Release note (bug fix): Fixed a bug where columns created with GENERATED
... BY IDENTITY with the SERIAL type could incorrectly fail internal
validations.
@rafiss rafiss force-pushed the relax-identity-validation branch from 32a8021 to fbf1492 Compare January 15, 2025 03:26
@rafiss
Copy link
Collaborator Author

rafiss commented Jan 15, 2025

tftr!

bors r+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-24.3.x Flags PRs that need to be backported to 24.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants