| From: | "Richard Huxton" <dev(at)archonet(dot)com> |
|---|---|
| To: | "Ben-Nes Michael" <miki(at)canaan(dot)co(dot)il>, <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Roll Back dont roll back counters |
| Date: | 2001-08-16 11:19:26 |
| Message-ID: | 003501c12645$508559c0$1001a8c0@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
From: "Ben-Nes Michael" <miki(at)canaan(dot)co(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Gunnar Rønning | 2001-08-16 11:25:04 | Re: Re: Re: Storing images in PG? |
| Previous Message | Martijn van Oosterhout | 2001-08-16 11:14:40 | Re: Roll Back dont roll back counters |