-
Notifications
You must be signed in to change notification settings - Fork 4.1k
ALTER INDEX IF EXISTS does not seem to work #42399
Copy link
Copy link
Closed
Labels
A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.S-3-ux-surpriseIssue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.
Description
Describe the problem
The syntax ALTER INDEX IF EXISTS does not seem to work. It seems its implementation was forgotten in #2034
To Reproduce
Run this statement:
alter index if exists i1 rename to i2;I'm expecting it to be ignored, but I'm getting:
SQL Error [42704]: ERROR: index "i1" does not exist
Environment:
- CockroachDB version: CockroachDB CCL v19.2.0-rc.4 (x86_64-unknown-linux-gnu, built 2019/11/05 20:40:29, go1.12.12)
- Server OS: Linux in DOcker
- Client app: JDBC
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.S-3-ux-surpriseIssue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.