| От | Bruce Momjian |
|---|---|
| Тема | Re: sequences and Transactions |
| Дата | |
| Msg-id | 200004271139.HAA05216@candle.pha.pa.us обсуждение |
| Ответ на | sequences and Transactions (Elmar.Haneke@gmx.de) |
| Список | pgsql-general |
> Hi! > > how can I setup sequences to have the current-value reset in case > of an Transaction rollback. > > My intension is to get an contignous numbering of the rows. > Currently in case of an Rollback one number is skipped since > the record itself is not inserted but the counter is not reset. People have asked this before. If we did that rollback, we would have to lock the sequence value for the duration of the transaction, which is not good. No real way to do this, sorry. -- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера