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 should provide this besides the last feature.
Moreover I figured out that if I use serial as datatype for my IDs it is allways increment if I insert sth., if I use nextval(...) and also if a transaction is aborted.
Now if I do some inserts and deletes in my database gaps are generated because the serial is allways incremented. Am I right that there is no possibility 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
--