![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
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. <br 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.<br 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.<br |
![]() |
| Thread Tools | |
| Display Modes | |
| |