Re: how to alter an enum type
От | Richard Broersma Jr |
---|---|
Тема | Re: how to alter an enum type |
Дата | |
Msg-id | 887842.54507.qm@web31805.mail.mud.yahoo.com обсуждение исходный текст |
Ответ на | Re: how to alter an enum type (Henrique Pantarotto <henpa@terra.com.br>) |
Список | pgsql-general |
--- On Mon, 12/24/07, Henrique Pantarotto <henpa@terra.com.br> wrote: > I actually want to change the enum values after I have > created and > associated it to a table colum. It looks like you will have to drop the type and re-create it. You might have to try a couple of tests: 1) BEGIN TRANSACTION; DROP the type create the type commit; --does your table have still reference this type? 2) BEGIN TRANSACTION; CREATE a new type with a different name alter the table column to refer to the new type drop the old type Commit; I wonder if it is possible to create an enum type using a select statement. This way the contents of the type can be seenin a base table. and it would be easy to recreate the type when new elements are added or removed. I'll have to playaround with this in the future to see what is possible. Regards, Richard Broersma Jr.
В списке pgsql-general по дате отправления: