Re: Problem with Auto Increment

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Problem with Auto Increment
Дата
Msg-id 20021104124318.I11215-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Problem with Auto Increment  (Ben Kassel <kasselb@nswccd.navy.mil>)
Список pgsql-sql
On Mon, 4 Nov 2002, Ben Kassel wrote:

> When I try to create a new row in this table and do not explicitly
> define a unique value for datadefindex I get the following error
> message:

>  More information : If I DROP the database, recreate it, and enter
> values into the table manually, the autoincrement works on this table.
> It seems that the problem arises after I reload the data into the table
> using the \i command on a file which was created using the pg_dump
> command.

Was that a data only dump that you were reloading? I'd guess that a data
only dump is assuming that you have/will set the sequence's next value
correctly yourself.  You might just try finding the max value and using
setval on the sequence to get the sequence in the right place.





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

Предыдущее
От: Ben Kassel
Дата:
Сообщение: Problem with Auto Increment
Следующее
От: Larry Rosenman
Дата:
Сообщение: Re: [GENERAL] Database Design tool