-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: new partiton @* doesn't work with table/poor error message #40387
Labels
A-partitioning
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Comments
awoods187
added
A-partitioning
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
labels
Aug 30, 2019
solongordon
added a commit
to solongordon/cockroach
that referenced
this issue
Sep 12, 2019
If a user tries to modify multiple index partitions via ALTER PARTITION ... OF TABLE, they now receive a hint to use ALTER PARTITION ... OF INDEX instead. I also improved the help docs for `\h ALTER PARTITION` to specify how to use the wildcard syntax. Fixes cockroachdb#40387 Release note: None
craig bot
pushed a commit
that referenced
this issue
Sep 12, 2019
40709: sql: add a syntax hint for ALTER PARTITION r=solongordon a=solongordon If a user tries to modify multiple index partitions via ALTER PARTITION ... OF TABLE, they now receive a hint to use ALTER PARTITION ... OF INDEX instead. I also improved the help docs for `\h ALTER PARTITION` to specify how to use the wildcard syntax. Fixes #40387 Release note: None Co-authored-by: Solon Gordon <solon@cockroachlabs.com>
This looks great! root@127.0.0.1:56179/movr> ALTER PARTITION new_york OF TABLE movr.rides@* CONFIGURE ZONE USING constraints='[+region=us-east,+az=1]'; ALTER PARTITION chicago OF TABLE rides@* CONFIGURE ZONE USING constraints='[+region=us-central,+az=1]'; ALTER PARTITION seattle OF TABLE movr.rides@* CONFIGURE ZONE USING constraints='[+region=us-west,+az=2]';
invalid syntax: statement ignored: at or near "configure": syntax error: index wildcard unsupported in ALTER PARTITION ... OF TABLE
DETAIL: source SQL:
ALTER PARTITION new_york OF TABLE movr.rides@* CONFIGURE ZONE USING constraints='[+region=us-east,+az=1]'
^
HINT: try ALTER PARTITION <partition> OF INDEX <tablename>@* |
ajwerner
pushed a commit
to ajwerner/cockroach
that referenced
this issue
Sep 13, 2019
If a user tries to modify multiple index partitions via ALTER PARTITION ... OF TABLE, they now receive a hint to use ALTER PARTITION ... OF INDEX instead. I also improved the help docs for `\h ALTER PARTITION` to specify how to use the wildcard syntax. Fixes cockroachdb#40387 Release note: None
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-partitioning
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
I tried out the new @* syntax from #39357 (comment) via:
I observed:
It's confusing to me that we chose the INDEX over the TABLE here given that it applies to the entire table. I'd expect to either alias and be able to use either or at the very least to get a warning with the new syntax that you need to use INDEX when using the @* syntax.
The text was updated successfully, but these errors were encountered: