serial = autoincrement = without gaps ?? - Mailing list pgsql-novice

From go_speedy@freenet.de
Subject serial = autoincrement = without gaps ??
Date
Msg-id E1CN42p-0003m2-R6@www14.emo.freenet-rz.de
Whole thread Raw
Responses Re: serial = autoincrement = without gaps ??  (Oliver Fromme <olli@lurza.secnetix.de>)
List pgsql-novice
Hi,

I want to use IDs in my tables which are autoincremented (by inserting new =
data), unique and without gaps. I figured out that the datatype serial shou=
ld provide this besides the last feature.
Moreover I figured out that if I use serial as datatype for my IDs it is al=
lways increment if I insert sth., if I use nextval(...) and also if a trans=
action is aborted.
Now if I do some inserts and deletes in my database gaps are generated beca=
use the serial is allways incremented. Am I right that there is no possibil=
ity to reset the serial-datatype or to avoid gaps without gaining problems?=
 My problem at this is that I expect to run the database some years and  I =
imagine that some day the serial-datatype evokes an overrun which corrupts =
the database.

I hope you can deliver some infos that resolves my misgivings.

thx janla


--=20
<a href=3D"http://adserver.freenet.de/click.ng/site=3Dfn&prod=3Dchetools&ka=
t=3Drub&tbl=3Dwebmail&ppos=3D1&TransactionID=3D1098945959249369&rgtg=3D256"=
 target=3D"_blank"><img src=3D"http://adserver.freenet.de/image.ng/site=3Df=
n&prod=3Dchetools&kat=3Drub&tbl=3Dwebmail&ppos=3D1&TransactionID=3D10989459=
59249369&rgtg=3D256" border=3D"0">

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Question Regarding Locks
Next
From: Oliver Fromme
Date:
Subject: Re: serial = autoincrement = without gaps ??