sql: improve expression index usability#67197
Merged
craig[bot] merged 5 commits intoJul 15, 2021
Merged
Conversation
Member
Contributor
Author
|
|
27ddfe0 to
57fda29
Compare
Contributor
Author
|
Friendly ping @RaduBerinde and @cucaroach :) |
cucaroach
approved these changes
Jul 14, 2021
cucaroach
left a comment
Contributor
There was a problem hiding this comment.
Reviewed 1 of 2 files at r2, 11 of 11 files at r7, 9 of 9 files at r8, 9 of 9 files at r9, 9 of 9 files at r10, 9 of 9 files at r11.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @RaduBerinde)
RaduBerinde
approved these changes
Jul 15, 2021
RaduBerinde
left a comment
Member
There was a problem hiding this comment.
Reviewed 1 of 2 files at r2, 1 of 9 files at r8, 1 of 9 files at r10, 9 of 9 files at r11.
Reviewable status:complete! 2 of 0 LGTMs obtained (waiting on @mgartner)
Release note: None
Release note: None
Postgres does not allow expressions in unique constraints, but it does allow expressions in unique indexes. For now we allow expressions in unique constraints, because we cannot differentiate between a unique constraint and a unique index table definition: they are both parsed into the same struct, `tree.UniqueConstraintTableDef`. In the long term we may want to disallow expression in unique constraints to be consistent with Postgres. We could do this by changing the parser so that `UNIQUE ((a + b))` does not parse successfully. See cockroachdb#65825. Release note: None
…olumn
Previously, the error message returned when attempting to create a view
with an inaccessible column was confusing:
unimplemented: views do not currently support * expressions
The error message now reads:
column "x" does not exist
Release note: None
Release note: None
57fda29 to
04c4412
Compare
Contributor
Author
|
TFTRs! bors r+ |
Contributor
|
Build succeeded: |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
sql: do not allow renaming inaccessible columns
Release note: None
sql: do not allow inaccessible columns in primary keys
Release note: None
sql: support expressions in unique constraints
Postgres does not allow expressions in unique constraints, but it does
allow expressions in unique indexes. For now we allow expressions in
unique constraints, because we cannot differentiate between a unique
constraint and a unique index table definition: they are both parsed
into the same struct,
tree.UniqueConstraintTableDef.In the long term we may want to disallow expression in unique
constraints to be consistent with Postgres. We could do this by changing
the parser so that
UNIQUE ((a + b))does not parse successfully.See #65825.
Release note: None
sql: better error message when creating a view with an inaccessible column
Previously, the error message returned when attempting to create a view
with an inaccessible column was confusing:
The error message now reads:
Release note: None
sql: do not allow inaccessible columns to be dropped
Release note: None