"Michael Glaesemann" <grzm(at)seespotcode(dot)net> writes:
> On Dec 9, 2007, at 9:24 , Adriaan van Os wrote:
>> 3. nextval doesn't have an optional "increase" parameter (the increase is
>> always one).
> Not true. Please read the documentation at
> In particular, the INCREMENT BY option (and perhaps CACHE).
I think he's looking for a an option to increase a sequence which normally
increments by 1 by a larger number for a single transaction. You would want to
do this if you were doing an exceptional bulk operation. If you set the
"increment by" then if another transaction happens to come along while you've
modified it you'll waste N sequence numbers.
Seems like a reasonable feature request. But I do wonder if the OP has
actually tried just incrementing it one by one for each of the records being
inserted. Incrementing sequences is pretty damn quick and I doubt it would
actually be a bottleneck.
Ask me about EnterpriseDB's PostGIS support!
In response to
pgsql-hackers by date
|Next:||From: Alvaro Herrera||Date: 2007-12-10 01:48:39|
|Subject: Re: [HACKERS] "distributed checkpoint"|
|Previous:||From: Tom Lane||Date: 2007-12-10 00:46:29|
|Subject: Re: whats the deal with -u ? |
pgsql-bugs by date
|Next:||From: Alvaro Herrera||Date: 2007-12-10 02:39:40|
|Subject: Re: [HACKERS] BUG #3799: csvlog skips some logs|
|Previous:||From: Simon Riggs||Date: 2007-12-09 15:32:17|
|Subject: Re: BUG #3811: Getting multiple values from a sequencegenerator|