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

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Bruce Momjian <momjian(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing
Date: 2008-04-25 20:20:45
Message-ID: 20080425202045.GF5888@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Brendan Jurd escribió:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Sat, Apr 26, 2008 at 6:02 AM, Tom Lane wrote:
> > "Brendan Jurd" 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.
>
> I see. So to add a value on to the end with guaranteed ordering, you
> would have to rebuild the enum from scratch anyway.

The other alternative is to make the system generate the new OIDs in
such a way that the ordering is preserved. This, of course, has a lot
of problems of its own.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Dunstan 2008-04-25 20:33:24 Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing
Previous Message Tom Dunstan 2008-04-25 20:19:50 Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Dunstan 2008-04-25 20:33:24 Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing
Previous Message Tom Dunstan 2008-04-25 20:19:50 Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing