begin/end/abort work for sequences?

From: Kyle <kyle(at)actarg(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: begin/end/abort work for sequences?
Date: 1999-06-30 04:11:49
Message-ID: 199906300411.WAA22152@actarg.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I assumed that wrapping a call to nextval() in a transaction would allow
me to roll back the update of the sequence. But when I do the following:

begin;
select nextval('po_seq');
abort;

The sequence po_seq is advancing to the next value even though the
transaction was aborted. If I put other things like updates, inserts, etc.
inside the transaction, they seem to be rolled back OK, but not the
update of the sequence.

Am I doing something wrong?

----------------------------------------------------
Kyle Bateman President, Action Target Inc.
"Viva Yo!" kyle(at)actarg(dot)com (801)377-8033x101
----------------------------------------------------

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ansley, Michael 1999-06-30 07:24:56 RE: pgsql-sql-digest V1 #276
Previous Message Peter Eisentraut 1999-06-29 23:25:54 Escaping w/i regular expressions