Re: Sequence increased before constraint check

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Sequence increased before constraint check
Дата
Msg-id Pine.LNX.4.30.0102141945450.1112-100000@peter.localdomain
обсуждение исходный текст
Ответ на Sequence increased before constraint check  (pgsql-bugs@postgresql.org)
Список pgsql-bugs
> When a table is created with a serial column and another column that
> has a foreign key constraint, if the foreign key check fails, the
> sequence will still be updated.  This results in potential gaps in the
> serial column.

This is not a bug.  If you cannot have gaps in your number sequence then
you cannot use serial.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/

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

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Explain reports unexpected results with inheritance
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Explain reports unexpected results with inheritance