Re: Removing pg_migrator limitations - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Removing pg_migrator limitations
Date
Msg-id 11964.1261595556@sss.pgh.pa.us
Whole thread Raw
In response to Re: Removing pg_migrator limitations  (decibel <decibel@decibel.org>)
List pgsql-hackers
decibel <decibel@decibel.org> writes:
> Is there some reason why OIDs were used for ENUM instead of a general sequence? Were we worried about people screwing
withthe sequence?
 

No, we were worried about being able to do enum_out without outside
information as to which enum type it is.  If you don't mind doubling
the on-disk size of enum values, we could store the enum type OID and
a sequence number instead.

> A sequences would presumably eliminate all these issues. Even if we wanted to disallow user access to the sequence,
havingsomething that's not competing with all the other uses of OID would presumably make this a lot simpler.
 

The fact that it's shared with other uses of OID is 100% not relevant.
A counter shared across all enums would pose the same issues.  The
only way to simplify matters would be to have each enum have its own
value numbering, which would mean you need outside information to
identify the associated label.

Even if there were a really solid argument for changing this decision,
doing so would create on-disk compatibility problems that would be
even harder for pg_migrator to fix than what we're discussing now.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Removing pg_migrator limitations
Next
From: Tom Lane
Date:
Subject: Re: Removing pg_migrator limitations