RE: Sequences in transaction

From: Roger Wernersson <roger(dot)wernersson(at)mindark(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: RE: Sequences in transaction
Date: 2000-11-13 11:26:54
Message-ID: 5146853DD571D411AC54000102070D61012570@MINGBGNTS02
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)mailru(dot)com]
Sent: Monday, November 13, 2000 12:18 PM
To: pgsql-general(at)postgresql(dot)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.

Browse pgsql-general by date

  From Date Subject
Next Message Jason Davies 2000-11-13 12:39:08 How do I list foreign key info/relationships?
Previous Message igor 2000-11-13 11:17:42 Sequences in transaction