Re: extensible enum types - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: extensible enum types
Date
Msg-id 4C1BA52E.6060809@dunslane.net
Whole thread Raw
In response to Re: extensible enum types  ("David E. Wheeler" <david@kineticode.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: extensible enum types
Next
From: Andrew Dunstan
Date:
Subject: Re: extensible enum types