From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Bruce Momjian <momjian(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing |
Date: | 2008-04-25 18:27:18 |
Message-ID: | 20080425182718.GD5888@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers 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
From | Date | Subject | |
---|---|---|---|
Next Message | Brendan Jurd | 2008-04-25 18:40:16 | Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing |
Previous Message | Andrew Dunstan | 2008-04-25 17:48:28 | Re: pgsql: Update: < * Allow adding enumerated values to an existing |
From | Date | Subject | |
---|---|---|---|
Next Message | Brendan Jurd | 2008-04-25 18:40:16 | Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing |
Previous Message | Andrew Dunstan | 2008-04-25 17:48:28 | Re: pgsql: Update: < * Allow adding enumerated values to an existing |