Re: dump the database data

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tony Smith <quickcur(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dump the database data
Date: 2005-07-08 17:19:35
Message-ID: 20050708171935.GA1828@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-07-08 17:57:24 Re: Postgresql 7.4.8 inconsistent index usage
Previous Message Scott Marlowe 2005-07-08 17:15:20 Re: anybody used ERWin with pg?