release-24.1: sql/catalog: exempt views from crdb_region validation #152744
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport 1/1 commits from #152670.
/cc @cockroachdb/release
Previously, views using
crdb_region
in expressions were incorrectly rejected by multi-region validation. The logic assumed that region enums must correspond to explicit columns in the descriptor, failing to account for views that referencecrdb_region
from underlying tables.This change updates the validation to allow such expressions in views.
Fixes #151216
Fixes #152197
Release note (bug fix): views can now reference the
crdb_region
column from underlying tables in expressions.Release justification: low-risk bug fix that surfaced through a sentry report to prevent false positives when identifying descriptor corruptions.