Re: WIP: extensible enums - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WIP: extensible enums
Date
Msg-id 11933.1287881676@sss.pgh.pa.us
Whole thread Raw
In response to Re: WIP: extensible enums  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: WIP: extensible enums
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Seriously, I think it might be OK. Could we provide some safe way of 
> resetting the sortorder values? Or even a not-entirely-safe 
> superuser-only function might be useful. Binary upgrade could probably 
> call it safely, for example.

You could do it with plain SQL, as long as you weren't concerned about
confusing processes that were concurrently loading their enum caches.

Another thought here is that the split-in-half rule might be
unnecessarily dumb.  It leaves equal amounts of code space on both sides
of the new value, even though the odds of subsequent insertions on both
sides are probably unequal.  But I'm not sure if we can predict the
usage pattern well enough to know which side is more likely.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: WIP: extensible enums
Next
From: Robert Haas
Date:
Subject: Re: WIP: extensible enums