Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing
От | Alvaro Herrera |
---|---|
Тема | Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing |
Дата | |
Msg-id | 20080425182718.GD5888@alvh.no-ip.org обсуждение исходный текст |
Ответы |
Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing
Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing |
Список | pgsql-hackers |
Andrew Dunstan wrote: > > Bruce Momjian wrote: >> Log Message: >> ----------- >> Update: >> >> < * Allow adding enumerated values to an existing enumerated data >> >>> * Allow adding/removing enumerated values to an existing enumerated data > > Where did this come from? Adding values anywhere except on the end of > the enumeration list will be fraught with danger, as will removing them. > In essence, either operation would entail rewriting every table that > used the type. Anything else carries a major risk of corruption. That > seems like a pretty bad idea. We already support rewriting tables ... (albeit only one at a time, I admit. Doing it for more than one can cause deadlocks). Still, if the user wants to pay the cost, why should we prohibit it? Perhaps we should add a pg_depend entries on tables using the type (or we have them already), and disallow modifying it unless there are no users of it. So the user can create a new enum with the options he wants, then rewrite his tables one by one, then drop the original. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-hackers по дате отправления: