Re: functions, transactions, key violations

Поиск
Список
Период
Сортировка
От Ioannis Tambouras
Тема Re: functions, transactions, key violations
Дата
Msg-id 20080605132538.GA6342@akroninc.net
обсуждение исходный текст
Ответ на functions, transactions, key violations  (Michael Glaesemann <grzm@seespotcode.net>)
Список pgsql-general
 Apart from concurrency issues, it is possible that you
have sequence generation problems. Depending on how
you inserted the original rows into the 'purchases' table, it is possible
that the nextval number has not kept-up and is lagging behind.

 You need to ensure that 'purchases_purchase_id_seq' is pointing
to the correct next value! That is, if it is current nextval
is number 100, but you already have 110 rows on the table (without gaps),
it is no wonder you will receive primary key violations for the
next 10 inserts but will work fine afterwards. ( Assuming, of course,
you are the only one receiving values from the sequence.)


 Thanks
 Ioannis Tambouras

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

Предыдущее
От: "Richard Broersma"
Дата:
Сообщение: Re: Tripping up on my first attempt at building PG from source
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: How can I compare sql create script with running database?