From: Gerhard Dieringer <DieringG@eba-haus.de>
To: pgsql-sql@hub.org
To: Fredrik_Eriksson@NAI.com
Subject: Antw: Rollback & Nextval fails
Date: Mon, 29 May 2000 11:44:21 +0200
Message-ID: <s9325817.046@kopo001> (raw)
Fredrik Eriksson wrote:
> I have been trying the following SQL code :
> BEGIN;
> INSERT INTO table VALUES ( NEXTVAL('serial'), 'Data' );
> ROLLBACK;
> And the insert function is rolled back but the serial sequence isn't. Hav I
> misunderstood the functionality of rollback or is this a bug? Is there
> someway to get the functionality that rollsback everything?
It's not a bug but a feature.
Sequence numbers exist to create unique entity-id-number with (usually) no external meaning, so
1.) there is no need to roll them back
2.) the system would have to keep a list, what sequence number were rolled back.
Gerhard
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: DieringG@eba-haus.de, pgsql-sql@hub.org, Fredrik_Eriksson@NAI.com
Subject: Re: Rollback & Nextval fails
In-Reply-To: <s9325817.046@kopo001>
References: <s9325817.046@kopo001>
* 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