Re: Generating Lots of PKs with nextval(): A Feature Proposal - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Generating Lots of PKs with nextval(): A Feature Proposal
Date
Msg-id AANLkTinyyQHei5PITuv2fTW8TvPRugCr2AKcEZKT9lfj@mail.gmail.com
Whole thread Raw
In response to Re: Generating Lots of PKs with nextval(): A Feature Proposal  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, May 14, 2010 at 6:11 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Peter Crabtree <peter.crabtree@gmail.com> writes:
>> On Fri, May 14, 2010 at 5:29 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>>> If we do this, I'm inclined to think that the extra argument to
>>> nextval() should be treated as overriding the base increment rather
>>> than specifying a multiplier for it.  Other than that nitpick, it
>>> sounds like a reasonable thing to allow.
>
>> After giving it some thought, that sounds better. You gain some
>> functionality that way (temporarily overriding the interval) and lose
>> none.
>
> Well, what you lose is the previous assurance that values of nextval()
> were always multiples of the increment.  I could see that breaking
> applications that are using non-unity increments.

Err, right.  But those applications presumably will also not be using
this new behavior.  There are no versions of PG that have an extra
argument to nextval but still guarantee that the values of nextval()
are multiples of the increment.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: max_standby_delay considered harmful
Next
From: Bruce Momjian
Date:
Subject: Re: Parameter oddness; was HS/SR Assert server crash