Re: dump the database data
От | Michael Fuhr |
---|---|
Тема | Re: dump the database data |
Дата | |
Msg-id | 20050708171935.GA1828@winnie.fuhr.org обсуждение исходный текст |
Ответ на | Re: dump the database data (Michael Fuhr <mike@fuhr.org>) |
Список | pgsql-general |
[Please copy the mailing list on replies so others can contribute to and learn from the discussion.] On Fri, Jul 08, 2005 at 09:59:35AM -0700, Tony Smith wrote: > no, I did not see it. The insert is INSERT into user > values(5, "George", 1); My dump command is > > pg_dump -d databaseName > > There maybe more options for username, password. But > nothing else. Is there any options in the pg_dump > could fix this? What version of PostgreSQL are you using? I just tested 7.2.8, 7.3.10, 7.4.8, 8.0.3, and 8.1devel, and pg_dump from all of them emitted a setval() to update the sequence. The line should resemble one of the following, depending on the version: SELECT setval ('"user_id_seq"', 7, true); SELECT pg_catalog.setval('user_id_seq', 7, true); SELECT pg_catalog.setval(pg_catalog.pg_get_serial_sequence('"user"', 'id'), 7, true); Did you do a visual search or did you use a command like "grep setval filename"? -- Michael Fuhr http://www.fuhr.org/~mfuhr/
В списке pgsql-general по дате отправления: