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

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: BUG #3811: Getting multiple values from a sequence generator
Дата
Msg-id 46C29778-AD75-4E3B-91A9-CE159173B608@seespotcode.net
обсуждение исходный текст
Ответ на BUG #3811: Getting multiple values from a sequence generator  ("Adriaan van Os" <postgres@microbizz.nl>)
Ответы Re: BUG #3811: Getting multiple values from a sequence generator  (Gregory Stark <stark@enterprisedb.com>)
Список 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 по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: BUG #3811: Getting multiple values from a sequence generator
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: BUG #3811: Getting multiple values from a sequence generator