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