Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: Reuse seria...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 3050 of 3215
Post > Topic >>

Re: Reuse serial numbers?

by andreas.kretschmer@[EMAIL PROTECTED] ("A. Kretschmer") Mar 27, 2008 at 10:49 AM

am  Thu, dem 27.03.2008, um  9:36:57 +0000 mailte A B folgendes:
> 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.

Why do you think you need the numbers?

Normally, you don't need this, a sequence can produce sufficient
numbers.

If you really need this behavior:
http://www.varlena.com/GeneralBits/130.php


Regards, Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 3 Posts in Topic:
Reuse serial numbers?
gentosaker@[EMAIL PROTECT  2008-03-27 09:36:57 
Re: Reuse serial numbers?
andreas.kretschmer@[EMAIL  2008-03-27 10:49:06 
Re: Reuse serial numbers?
gentosaker@[EMAIL PROTECT  2008-03-27 10:17:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Sep 8 3:31:57 CDT 2008.