Transactions + sequences

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Transactions + sequences
Дата
Msg-id 20000922134325.A3414@klamath.dyndns.org
обсуждение исходный текст
Ответы Re: Transactions + sequences  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
Consider the following (PgSQL 7.0.2):

CREATE SEQUENCE foo;
SELECT nextval('foo');
-- returns 1
BEGIN WORK;
SELECT nextval('foo');
-- returns 2
ABORT WORK;
SELECT nextval('foo');
-- returns 3

As you can see, even though the transaction has been aborted, the
sequence is still incremented. Is there any way to work around this?
Are there any plans to change this behavior in the future?

Just wondering, it's not a life or death matter.

Thanks in advance,

Neil

--
Neil Conway <neilconway@home.com>
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed

Secrecy is the beginning of tyranny.
        -- Heinlein

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: "Adam Lang"
Дата:
Сообщение: Re: PSQL Books
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Transactions + sequences