How to drop a value from an ENUM? - Mailing list pgsql-general

From Torsten Förtsch
Subject How to drop a value from an ENUM?
Date
Msg-id CAKkG4_=MMSFLd7RvUho4kStk-YDgHp96hAij_CQZV6xreWj-Rw@mail.gmail.com
Whole thread Raw
Responses Re: How to drop a value from an ENUM?
Re: How to drop a value from an ENUM?
List pgsql-general
Hi,

I am absolutely sure a certain value of one of my ENUM types is not used in the entire database. Now I am asked to drop that value. Unfortunately, there is no ALTER TYPE DROP VALUE.

On my development box I tried

delete from pg_enum
 where enumtypid='my_type_name'::regtype
   and enumlabel='my_label'

It worked and I could not find any adverse effects.

Given the value is not used anywhere, is this a save command?

Thanks,
Torsten

pgsql-general by date:

Previous
From: Tim Cross
Date:
Subject: Re: pgdg-keyring (or apt-key) failure on fresh 9.6 install
Next
From: Thomas Kellerer
Date:
Subject: binaries for 11 beta compiled with --with-llvm?