Re: Removing pg_migrator limitations

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Removing pg_migrator limitations
Дата
Msg-id 11964.1261595556@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Removing pg_migrator limitations  (decibel <decibel@decibel.org>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Removing pg_migrator limitations
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Removing pg_migrator limitations