Re: Sequence skipping values

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: David Rio Deiros
Дата:
Сообщение: Re: distinct not working in a multiple join
Следующее
От: Tony Caduto
Дата:
Сообщение: Re: Tool