From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Subject: | Re: Removing pg_migrator limitations |
Date: | 2009-12-23 20:09:46 |
Message-ID: | 12896.1261598986@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Stark <gsstark(at)mit(dot)edu> writes:
> On Wed, Dec 23, 2009 at 7:17 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2009-12-23 20:15:14 | Re: creating index names automatically? |
Previous Message | Tom Lane | 2009-12-23 19:55:56 | About the CREATE TABLE LIKE indexes vs constraints issue |