pg_dump trouble - Mailing list pgsql-admin

From gauthier lawny
Subject pg_dump trouble
Date
Msg-id 20040924123359.77475.qmail@web42007.mail.yahoo.com
Whole thread Raw
Responses Re: pg_dump trouble
List pgsql-admin
Here is the trouble I encountered.

I got 2 tables like
create table mytable(idnop serial, other varchar,
primary key (idnop));
create table reftable(idnop integer references
mytable, primary key (idnop));

pgsql create implicitly a sequence to handle the idnop
serial.
I perfomed some insertions into the 2 tables, no
problem.
Afterthat I run pg_dump with -D option (insert into
(colomn, ...) values (...);
The trouble is when it dumps the sequence. Instead of
dumping the current value (which is the last used for
an insertion into mytable) it dumps the value 1.
Obviously when I restore the data and I try to perform
an other insertion into mytable it fails because of
the  primary key violation.

The presence of -D option doesn't have any effect on
the result.






Vous manquez d’espace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A
téléchargergratuitement sur http://fr.messenger.yahoo.com 

pgsql-admin by date:

Previous
From: Kris Kiger
Date:
Subject: Re: tsearch2 poor performance
Next
From: Brian McCane
Date:
Subject: Re: VACUUM FULL