pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: gauthier lawny <gauthier_lawny@yahoo.fr>
To: pgsql-admin@postgresql.org
Subject: pg_dump trouble
Date: Fri, 24 Sep 2004 14:33:59 +0200 (CEST)
Message-ID: <20040924123359.77475.qmail@web42007.mail.yahoo.com> (raw)

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écharger gratuitement sur http://fr.messenger.yahoo.com



view thread (2+ messages)  latest in thread

Message-ID: <20040924123359.77475.qmail@web42007.mail.yahoo.com>
Permalink:  ../20040924123359.77475.qmail@web42007.mail.yahoo.com/
Also on:    postgresql.org/message-id/20040924123359.77475.qmail@web42007.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: gauthier_lawny@yahoo.fr
  Subject: Re: pg_dump trouble
  In-Reply-To: <20040924123359.77475.qmail@web42007.mail.yahoo.com>
  References: <20040924123359.77475.qmail@web42007.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox