How do I delete an enum type value that I created in postgresql?
create type admin_level1 as enum(\'classifier\', \'moderator\', \'god\');
For those who wish to modify the enum values, recreating it seems to be the only viable and safe solution.
It consists in temporarely convert the enum column to a string format, recreate the enum and then reconverting the string column back to the enum type.
Here is an example:
ALTER TABLE your_schema.your_table ALTER COLUMN your_column TYPE varchar(255);
ALTER TABLE your_schema.your_table ALTER COLUMN your_column SET DEFAULT('your_default_enum_value');
DROP TYPE your_schema.your_enum_name;
CREATE TYPE your_schema.your_enum_name AS ENUM ('enum1', 'enum2', 'enum3');
ALTER TABLE your_schema.your_table ALTER your_column DROP DEFAULT;
ALTER TABLE your_schema.your_table ALTER COLUMN your_column TYPE your_schema.your_enum_name USING your_enum_name::your_schema.your_column;
ALTER TABLE your_schema.your_table ALTER COLUMN your_column SET DEFAULT('your_default_enum_value');