Re: Insert unique fails, still increments ID in a lookup table

Поиск
Список
Период
Сортировка
Искать
От
Chris
Тема
Re: Insert unique fails, still increments ID in a lookup table
Дата
Msg-id
4AB87C4F.8010800@gmail.com
Ответ на
Список
Дерево обсуждения
Insert unique fails, still increments ID in a lookup table Mark Felegyhazi <m_felegyhazi@yahoo.com>
Re: Insert unique fails, still increments ID in a lookup table Chris <dmagick@gmail.com>
Re: Insert unique fails, still increments ID in a lookup table Scott Ribe <scott_ribe@killerbytes.com>

> The problem is that the uniqueness check apparently increases the serial counter and hence I burn through the bigint IDs much faster. It's a waste for 100m+ records...

It's a little hidden but

http://www.postgresql.org/docs/current/static/functions-sequence.html

Per the last sentence, updates to the sequence are never rolled back - 
the insert is always going to increment the id regardless of whether it 
hits the exception or not.

-- 
Postgresql & php tutorials
http://www.designmagick.com/

В списке pgsql-general по дате отправления
От: David Spadea
Дата:
Сообщение: Re: 8.4 installer
От: Tore Halvorsen
Дата:
FAQ