Modifying ENUM Type

Started by APseudoUtopiaalmost 17 years ago2 messagesgeneral
Jump to latest
#1APseudoUtopia
apseudoutopia@gmail.com

Hey,

I created an ENUM type. However, I accidentally typoed in one of the
enum values. It is "apps" and it should be "app". What's the best way
to modify this without dropping the type? I have many tables which
have columns that depend on the type, and I'm trying to avoid having
to recreate all those tables again (which would be the case if I have
to drop the type).

Can I just edit the pg_enum table manually? Will this mess anything up?

Thanks.

#2Merlin Moncure
mmoncure@gmail.com
In reply to: APseudoUtopia (#1)
Re: Modifying ENUM Type

On Sat, May 30, 2009 at 3:55 AM, APseudoUtopia <apseudoutopia@gmail.com> wrote:

Hey,

I created an ENUM type. However, I accidentally typoed in one of the
enum values. It is "apps" and it should be "app". What's the best way
to modify this without dropping the type? I have many tables which
have columns that depend on the type, and I'm trying to avoid having
to recreate all those tables again (which would be the case if I have
to drop the type).

Can I just edit the pg_enum table manually? Will this mess anything up?

yes. just be careful.

merlin