Greg Stark <gsst...@mit.edu> writes:
> On Wed, Dec 23, 2009 at 7:17 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
>> The reason that isn't implemented is that it's *hard* --- in fact,
>> it appears to be entirely impossible in the general case, unless you're
>> willing to change existing values of the enum on-disk.

> Shouldn't adding new ones be easy?

No, not if you care about where they end up in the type's sort ordering.

In pg_migrator's case that's not an issue because it's going to force
the OID numbering for each of the elements.  However, an ADD ENUM VALUE
option that *doesn't* use a predetermined OID is going to end up
inserting the new value at a not-very-predictable place.  I do not think
we should expose a half-baked behavior like that as standard SQL syntax.
If we're going to implement something whose ambitions only extend to
satisfying pg_migrator's needs, then it should be a specialized
pg_migrator function.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to