RE: Sequences in transaction - Mailing list pgsql-general

From Roger Wernersson
Subject RE: Sequences in transaction
Date
Msg-id 5146853DD571D411AC54000102070D61012570@MINGBGNTS02
Whole thread Raw
In response to Sequences in transaction  (igor <igor_kh@mailru.com>)
List pgsql-general
Sequences are not supposed to be undoable. A number in the sequence must
"never" turn up twice. Just because you didn't commit the transaction
selecting a new number from the sequence doesn't mean you didn't use it for
something else.

The point being to always getting a unique number, not using every number in
the sequence. You would have to create your own table for that, remembering
"holes" of unused numbers in the sequence for later usage.

/Roger

-----Original Message-----
From: igor [mailto:igor_kh@mailru.com]
Sent: Monday, November 13, 2000 12:18 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Sequences in transaction


Hi,

Help me please to understand such a thing:
Rollback of sequences doesn't work in transaction.
Is it right? Or may be there is another way to restore
it's value?
Running PG 7.02 on RH 6.0

Thanks ,
Igor.


pgsql-general by date:

Previous
From: igor
Date:
Subject: Sequences in transaction
Next
From: Jason Davies
Date:
Subject: How do I list foreign key info/relationships?