How to drop a value from an ENUM?

Поиск
Список
Период
Сортировка
От Torsten Förtsch
Тема How to drop a value from an ENUM?
Дата
Msg-id CAKkG4_=MMSFLd7RvUho4kStk-YDgHp96hAij_CQZV6xreWj-Rw@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to drop a value from an ENUM?  (Melvin Davidson <melvin6925@gmail.com>)
Re: How to drop a value from an ENUM?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tim Cross
Дата:
Сообщение: Re: pgdg-keyring (or apt-key) failure on fresh 9.6 install
Следующее
От: Thomas Kellerer
Дата:
Сообщение: binaries for 11 beta compiled with --with-llvm?