Re: Roll Back dont roll back counters

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Roll Back dont roll back counters
Дата
Msg-id 003501c12645$508559c0$1001a8c0@archonet.com
обсуждение исходный текст
Ответ на Roll Back dont roll back counters  ("Ben-Nes Michael" <miki@canaan.co.il>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Gunnar Rønning
Дата:
Сообщение: Re: Re: Re: Storing images in PG?
Следующее
От: "Roderick A. Anderson"
Дата:
Сообщение: Re: Roll Back dont roll back counters