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

From Tom Lane
Subject Re: Generating Lots of PKs with nextval(): A Feature Proposal
Date
Msg-id 10932.1273872421@sss.pgh.pa.us
Whole thread Raw
In response to Generating Lots of PKs with nextval(): A Feature Proposal  (Peter Crabtree <peter.crabtree@gmail.com>)
Responses Re: Generating Lots of PKs with nextval(): A Feature Proposal
List pgsql-hackers
Peter Crabtree <peter.crabtree@gmail.com> writes:
> Now, I was reminded that I could simply do this:

> SELECT nextval('my_seq') FROM generate_series(1, 500);

> But of course then I would have no guarantee that I would get a
> contiguous block of ids,

The existing "cache" behavior will already handle that for you,
I believe.  I don't really see a need for new features here.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: recovery consistent != hot standby
Next
From: Robert Haas
Date:
Subject: Re: Generating Lots of PKs with nextval(): A Feature Proposal