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

BUG #4023: The transaction control does not work for sequences

From: "Giovani Murilo Dantas Correa" <contato(at)isolution(dot)inf(dot)br>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4023: The transaction control does not work for sequences
Date: 2008-03-10 20:58:02
Message-ID: 200803102058.m2AKw2RW017318@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      4023
Logged by:          Giovani Murilo Dantas Correa
Email address:      contato(at)isolution(dot)inf(dot)br
PostgreSQL version: 8.3.0 and 8.1.9
Operating system:   Linux 2.6.X (Slackware and Fedora)
Description:        The transaction control does not work for sequences
Details: 

create sequence seq_test;
select nextval('seq_test'); --return value 1
select nextval('seq_test'); --return value 2
select nextval('seq_test'); --return value 3
BEGIN;
select nextval('seq_test'); --return value 4
select nextval('seq_test'); --return value 5
select nextval('seq_test'); --return value 6
ROLLBACK;
select currval('seq_test'); --return value 6

This is not right. The currval must have be 3 and not 6.

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2008-03-10 21:15:49
Subject: Re: BUG #4023: The transaction control does not work for sequences
Previous:From: Tom LaneDate: 2008-03-10 19:37:10
Subject: Re: Rulese Bug: Instead of reporting incorrect insert count.

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