| От | Michael Fuhr |
|---|---|
| Тема | Re: Sequence skipping values |
| Дата | |
| Msg-id | 20060210184136.GA2837@winnie.fuhr.org обсуждение |
| Ответ на | Re: Sequence skipping values (Steve Crawford <scrawford@pinpointresearch.com>) |
| Список | pgsql-general |
On Fri, Feb 10, 2006 at 09:57:31AM -0800, Steve Crawford wrote: > There is no guarantee that a sequence will be contiguous. For example, > begin...insert into...rollback will not reset the sequence as other > transactions could have incremented the sequence. Also, deleting records won't modify the sequence (unless a trigger does so; the point is that the delete itself doesn't). If you delete the latest records in the table, the sequence will continue from where it was after the last insert (more properly, after the last call to nextval), not from the new highest value in the table. Other possibilities, though less likely, are that the sequence has non-default CACHE or INCREMENT values. -- Michael Fuhr
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера