Thread: pgsql: Update: < * Allow adding enumerated values to an existing

pgsql: Update: < * Allow adding enumerated values to an existing

From
momjian@postgresql.org (Bruce Momjian)
Date:
Log Message:
-----------
Update:

< * Allow adding enumerated values to an existing enumerated data
> * Allow adding/removing enumerated values to an existing enumerated data

Modified Files:
--------------
    pgsql/doc:
        TODO (r1.2437 -> r1.2438)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/TODO?r1=1.2437&r2=1.2438)
    pgsql/doc/src/FAQ:
        TODO.html (r1.943 -> r1.944)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/FAQ/TODO.html?r1=1.943&r2=1.944)

Re: pgsql: Update: < * Allow adding enumerated values to an existing

From
Andrew Dunstan
Date:

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.

cheers

andrew

Re: pgsql: Update: < * Allow adding enumerated values to an existing

From
Gregory Stark
Date:
"Andrew Dunstan" <andrew@dunslane.net> writes:

> 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.

The TODO doesn't say anything about there not being restrictions. Only being
able to add to the end seems like a likely such restriction.

And removing entries is "only" an engineering problem where you have to go out
and check that there are no records referencing that entry.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's RemoteDBA services!