Skip to content

ALTER INDEX IF EXISTS does not seem to work #42399

@lukaseder

Description

@lukaseder

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

Metadata

Metadata

Assignees

Labels

A-sql-pgcompatSemantic compatibility with PostgreSQLC-bugCode 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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions