Reuse serial numbers?

From: "A B" <gentosaker(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Reuse serial numbers?
Date: 2008-03-27 09:36:57
Message-ID: dbbf25900803270236h17eae234x420c9c72756a5090@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello.
I have a table
create table TBL (a serial, b integer, c integer, unique(b,c));

so I for each combination of b,c get an unique number a.

Now, if the table is filled and I remove some rows, so there is a gap
in the a numbers. Is there a way to reuse the "free" serial numbers?

I don't feel like writing a script to select all numbers and do some
searching for free numbers.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message A B 2008-03-27 09:45:33 Ignore unique violations?
Previous Message Tom Lane 2008-03-25 15:22:43 Re: difference in MVCC in 8.3 vs 8.2