cockroachdb / cockroachdb/cockroach

ALTER TYPE DROP VALUE does not support "IF EXISTS" suffix

Open
#120,801 1 comment 0 reactions 0 assignees View on GitHub
C-enhancement O-community P-3 T-sql-foundations
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Is your feature request related to a problem? Please describe.**

It's extremely useful for DDL statements to be idempotent - the `IF NOT EXISTS` syntax is a part of CockroachDB and Postgres as a whole that makes this feasible.

**Describe the solution you'd like**

Postgres' interface has this syntax already, but:

https://www.postgresql.org/docs/current/sql-altertype.html

```
ALTER TYPE name DROP ATTRIBUTE [ IF EXISTS ] attribute_name [ CASCADE | RESTRICT ]
```

By supporting this interface, it would be much easier to issue "idempotent DDL statements" to CockroachDB.

Jira issue: CRDB-36872

Epic CRDB-60817

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.