X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A8E1F329E5E for ; Fri, 24 Sep 2004 13:34:03 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39133-06 for ; Fri, 24 Sep 2004 12:33:58 +0000 (GMT) Received: from web42007.mail.yahoo.com (web42007.mail.yahoo.com [66.218.93.175]) by svr1.postgresql.org (Postfix) with SMTP id C8992329E5C for ; Fri, 24 Sep 2004 13:34:00 +0100 (BST) Message-ID: <20040924123359.77475.qmail@web42007.mail.yahoo.com> Received: from [82.67.66.129] by web42007.mail.yahoo.com via HTTP; Fri, 24 Sep 2004 14:33:59 CEST Date: Fri, 24 Sep 2004 14:33:59 +0200 (CEST) From: gauthier lawny Subject: pg_dump trouble To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/237 X-Sequence-Number: 14940 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