Re: Removing pg_migrator limitations
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Bruce Momjian <bruce@momjian.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Greg Stark <gsstark@mit.edu>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2009-12-24T16:27:04Z
Lists: pgsql-hackers
Bruce Momjian wrote: >> I now think the easiest solution will be to have pg_dump create the enum >> with a single dummy value, delete the pg_enum dummy row, and then call a >> modified version of EnumValuesCreate() to insert row by row into >> pg_enum, with specified oids. >> > > 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. > > Either that or Tom's suggested approach of being able to create an empty enum type would be much cleaner than the dummy row suggestion. cheers andrew