Re: sequences in transaction blocks

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: Marian Naghen <naghen(at)ratb(dot)ro>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: sequences in transaction blocks
Date: 2005-12-19 07:50:48
Message-ID: 1134978649.4975.229.camel@Andrea.peacock.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am Montag, den 19.12.2005, 09:39 +0000 schrieb Marian Naghen:
> I want to insert records inside a transaction block (BEGIN -
> COMMIT/ROLLBACK). If the transaction fails,
> the sequence do not rollback and retain the new value.
>
> This is the default behavior of sequences ?

Yes it is (its the whole point of sequences)
please see the docs, for example:

http://www.postgresql.org/docs/current/static/functions-sequence.html

especially the last paragraph.

HTH
Tino Wildenhain

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-12-19 09:14:11 Re: Access bool integer solution
Previous Message A. Kretschmer 2005-12-19 07:42:25 Re: sequences in transaction blocks