Skip site navigation (1) Skip section navigation (2)

Re: BUG #3811: Getting multiple values from a sequence generator

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: "Adriaan van Os" <postgres(at)microbizz(dot)nl>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3811: Getting multiple values from a sequence generator
Date: 2007-12-09 13:18:01
Message-ID: 46C29778-AD75-4E3B-91A9-CE159173B608@seespotcode.net (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
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



In response to

Responses

pgsql-hackers by date

Next:From: Mark Cave-AylandDate: 2007-12-09 14:32:29
Subject: Re: Possible PostgreSQL 8.3beta4 bug with MD5authentication in psql?
Previous:From: Simon RiggsDate: 2007-12-09 12:45:50
Subject: Re: Release Note Changes

pgsql-bugs by date

Next:From: Simon RiggsDate: 2007-12-09 15:32:17
Subject: Re: BUG #3811: Getting multiple values from a sequencegenerator
Previous:From: Martin PittDate: 2007-12-09 10:43:48
Subject: Re: BUG #3809: SSL "unsafe" private key permissions bug

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group