Re: BUG #3811: Getting multiple values from a sequence generator - Mailing list pgsql-bugs

From Michael Glaesemann
Subject Re: BUG #3811: Getting multiple values from a sequence generator
Date
Msg-id 46C29778-AD75-4E3B-91A9-CE159173B608@seespotcode.net
Whole thread Raw
In response to BUG #3811: Getting multiple values from a sequence generator  ("Adriaan van Os" <postgres@microbizz.nl>)
Responses Re: BUG #3811: Getting multiple values from a sequence generator
List pgsql-bugs
On Dec 9, 2007, at 9:24 , Adriaan van Os wrote:

> 1. LOCK TABLE doesn't work on a sequence

> 2. nextval will happily ignore ISOLATION LEVEL SERIALIZABLE of
> concurrent
> transactions

Nor should it. Sequences are *by design* non-lockable and non-blocking.

http://www.postgresql.org/docs/faqs.FAQ.html#item4.11.4
http://www.postgresql.org/docs/8.2/static/functions-sequence.html

> 3. nextval doesn't have an optional "increase" parameter (the
> increase is
> always one).

Not true. Please read the documentation at

http://www.postgresql.org/docs/8.2/static/sql-createsequence.html
http://www.postgresql.org/docs/8.2/static/sql-altersequence.html

In particular, the INCREMENT BY option (and perhaps CACHE).

Michael Glaesemann
grzm seespotcode net

pgsql-bugs by date:

Previous
From: Simon Riggs
Date:
Subject: Re: BUG #3811: Getting multiple values from a sequence generator
Next
From: Gregory Stark
Date:
Subject: Re: BUG #3811: Getting multiple values from a sequence generator