Received: from bologna.nettuno.it (bologna.nettuno.it [193.43.2.1]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA97782 for ; Wed, 30 Jun 1999 08:16:58 -0400 (EDT) (envelope-from jose@sferacarta.com) Received: from proxy.sferacarta.com (mail@sfcabop1.nettuno.it [193.207.10.213]) by bologna.nettuno.it (8.8.6/8.8.8/NETTuno 3.2) with ESMTP id OAA21592; Wed, 30 Jun 1999 14:16:42 +0200 (MDT) Received: from rosso.sferacarta.com (sferacarta.com) [10.20.30.5] by proxy.sferacarta.com with esmtp (Exim 2.05 #1 (Debian)) id 10zL8K-0007fM-00; Wed, 30 Jun 1999 14:14:40 +0000 Message-ID: <377A08D5.77180127@sferacarta.com> Date: Wed, 30 Jun 1999 14:08:53 +0200 From: =?iso-8859-1?Q?Jos=E9?= Soares X-Mailer: Mozilla 4.5 [it] (Win95; I) X-Accept-Language: it MIME-Version: 1.0 To: Kyle CC: pgsql-sql@postgresql.org Subject: Re: [SQL] begin/end/abort work for sequences? References: <199906300411.WAA22152@actarg.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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'