From: "Ben-Nes Michael" <miki@canaan.co.il>
> If I design a table with SERIAL type and then try to insert few rows, but
> some of the rows are rolled back the roll back process does not roll back
> the counter status.
>
> Is there a way to do a roll back to the counter ?
No - sequences (as used by the serial type) are merely guaranteed to provide
unique (increasing) numbers to each backend. They aren't designed for
producing (always) sequential numbers.
Check the mail archives for a long discussion about this with regard to
invoice numbers.
- Richard Huxton