Search Postgresql Archives

Re: dump the database data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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/

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux