Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing
Date
Msg-id 27146.1209153724@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing  ("Brendan Jurd" <direvus@gmail.com>)
Responses Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing  ("Brendan Jurd" <direvus@gmail.com>)
List pgsql-hackers
"Brendan Jurd" <direvus@gmail.com> writes:
> Has anyone had a close look at how hard it would be allow just the
> "add to the end" capability?

The problem is you can't guarantee anything about the ordering of the
new value relative to the old ones.  The OID it's assigned might be
after them, or before them if the OID counter has wrapped around,
or (with much smaller probability) between two existing ones.

This is something we consciously gave up when we selected the current
ENUM implementation.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Proposed patch - psql wraps at window width
Next
From: "Brendan Jurd"
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing