Re: Removing pg_migrator limitations

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Greg Stark <gsstark@mit.edu>, Andrew Dunstan <andrew@dunslane.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2009-12-24T16:19:06Z
Lists: pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> I thought of a cleaner approach.  CREATE TYPE ENUM will create one enum
> with the specified oid, and then a server-side function will call
> EnumValuesCreate() be used to add each additional enum with a specified
> oid --- no deleting necessary.  I will start working on a patch for
> this.

The approach I originally suggested was to create the enum type with
*no* members, and then add the values one at a time.  It might take a
tweak to the CREATE TYPE AS ENUM grammar to allow zero members, but
I don't see any logical problem with such a thing.

			regards, tom lane