Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
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.


pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group