pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: José Soares <jose@sferacarta.com>
To: Kyle <kyle@actarg.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] begin/end/abort work for sequences?
Date: Wed, 30 Jun 1999 14:08:53 +0200
Message-ID: <377A08D5.77180127@sferacarta.com> (raw)
References: <199906300411.WAA22152@actarg.com>



Kyle ha scritto:

> 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?

No. I can't explain you why but AFAIK sequences don't  rollback.
______________________________________________________________
PostgreSQL 6.5.0 on i586-pc-linux-gnu, compiled by gcc 2.7.2.3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jose'





view thread (7+ messages)  latest in thread

Message-ID: <377A08D5.77180127@sferacarta.com>
Permalink:  ../377A08D5.77180127@sferacarta.com/
Also on:    postgresql.org/message-id/377A08D5.77180127@sferacarta.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: jose@sferacarta.com, kyle@actarg.com
  Subject: Re: [SQL] begin/end/abort work for sequences?
  In-Reply-To: <377A08D5.77180127@sferacarta.com>
  References: <199906300411.WAA22152@actarg.com> <377A08D5.77180127@sferacarta.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox