Re: Noob question: how to auto-increment index field on INSERT?

Поиск
Список
Период
Сортировка
От davemac
Тема Re: Noob question: how to auto-increment index field on INSERT?
Дата
Msg-id 1298456558145-3396818.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: Noob question: how to auto-increment index field on INSERT?  (Ken MacDonald <drken567@gmail.com>)
Список pgsql-novice
This could be due to the sequence being out of sync with the table itself.
Postgres uses the sequence to work out the id value to use for the new row.
The sequence should be the value of the id of the last row inserted in the
table. If the value of the sequence + 1 already exists in the table then you
will get this error. This all works by magic in Django provided the table
and the sequence match.
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Noob-question-how-to-auto-increment-index-field-on-INSERT-tp2141875p3396818.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.

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

Предыдущее
От: Craig Barnes
Дата:
Сообщение: Simple table creation
Следующее
От: "Mark Johnson"
Дата:
Сообщение: PostgreSQL 9.0.3 on RHEL 5.6?