From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Greg Stark <gsstark(at)mit(dot)edu>, 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-24 22:17:11 |
Message-ID: | 22354.1261693031@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Tom Lane wrote:
>> The approach I originally suggested was to create the enum type with
>> *no* members, and then add the values one at a time.
> Well, I was hesitant to modify the grammar, unless we want the ability
> to create enums with zero values. Doing enum with only one value will
> not be too complex for me and I don't think binary upgrade should affect
> the grammar unless there are other reasons we want to change.
The reason I don't want to do it that way is that then you need two
ugly kluges in the backend, not just one. With the zero-and-add-one
approach there is no need to have a "next enum oid" variable at all.
> We do allow tables with no columns, but we allow the addition of columns
> to a table, so it makes more sense there.
Well, we might eventually allow addition of values to enums too; the
fact that it's not implemented outside pg_migrator right now doesn't
mean we won't ever think of a solution. In any case I'm not persuaded
that a zero-element enum is totally without value. Think of it like a
domain with a "must be null" constraint.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2009-12-24 22:23:05 | Re: Removing pg_migrator limitations |
Previous Message | Bruce Momjian | 2009-12-24 22:10:57 | Re: Removing pg_migrator limitations |