Re: extensible enum types

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: extensible enum types
Дата
Msg-id 4C1BA52E.6060809@dunslane.net
обсуждение исходный текст
Ответ на Re: extensible enum types  ("David E. Wheeler" <david@kineticode.com>)
Список pgsql-hackers

David E. Wheeler wrote:
> What's the likelihood of a failure? 

Constructing a failure case would be simple. In practice, I suspect it 
would be very low.

> And would the position of the new label (represented by its internal number) be predictive? IOW, would updating the
samevarenumtype in two databases (or on two servers) yield the same underlying positional value?
 
>
>
>   

The algorithm I outlined is deterministic, so the same sequence of 
operations on the type would yield the same set of values on the 
low-order 16 bits. But that doesn't mean they would have the same high 
order 16 bits. That would depend on the history of the system. But more 
importantly, why do you care? the stored value is an implementation 
artefact that should be totally invisible to users. There would be no 
guarantee of the same underlying values on dump/reload either, just as 
there is not now for enums.

cheers

andrew


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: extensible enum types
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: extensible enum types