From: | "Gerhard Dieringer" <DieringG(at)eba-haus(dot)de> |
---|---|
To: | <pgsql-sql(at)hub(dot)org>, <Fredrik_Eriksson(at)NAI(dot)com> |
Subject: | Antw: Rollback & Nextval fails |
Date: | 2000-05-29 09:44:21 |
Message-ID: | s9325817.046@kopo001 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Grant Finnemore | 2000-05-29 09:50:10 | Re: Rollback & Nextval fails |
Previous Message | Eriksson, Fredrik | 2000-05-29 08:54:14 | Rollback & Nextval fails |