pg_dump incorrect sequence value - Mailing list pgsql-general

From Joshua L. San Juan
Subject pg_dump incorrect sequence value
Date
Msg-id 1062568139.10952.18.camel@joshua.q-linux.com
Whole thread Raw
Responses Re: pg_dump incorrect sequence value
List pgsql-general
Hi,

I had dumped data using the command:

pg_dump -U dbowner dbname -a -t table -f table-data.sql

two tables (e.g. table1, table2).

In the first table - the correct sequence was set as can
be seen at the end of the dump file:

....
SELECT pg_catalog.setval ('table1_id_seq', 20, true);

but in the second table - the sequence was incorrect:

...
SELECT pg_catalog.setval ('table2_id_seq', 1, true);

Question:
How do I correct this so that dumping data sets the
correct sequence value?

Using:
Red Hat 8
Linux 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 GNU/Linux

postgresql-libs-7.3.3-1PGDG
postgresql-tcl-7.3.3-1PGDG
postgresql-server-7.3.3-1PGDG
postgresql-7.3.3-1PGDG
postgresql-libs-7.2.2-1
postgresql-contrib-7.3.3-1PGDG



TIA,

Joshua





pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: French translation
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: Debian Woody 7.3.4 packages?