X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 49A9A9FA160 for ; Sat, 17 Jun 2006 23:55:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 13780-08 for ; Sat, 17 Jun 2006 23:55:43 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web31110.mail.mud.yahoo.com (web31110.mail.mud.yahoo.com [68.142.200.43]) by postgresql.org (Postfix) with SMTP id 1D66A9F9F2D for ; Sat, 17 Jun 2006 23:55:43 -0300 (ADT) Received: (qmail 91510 invoked by uid 60001); 18 Jun 2006 02:55:41 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=3WHCVZdPhNTjLigDCk41we5EmkQoGDFBSCA4WJSj+Rg28uo02TOacL+RZNtUGPoQxmvx+XEXai76yx8Di1Tgpp2+LucL8ZUdrsrBtTS8bEmu9I3TY6kTKUVZDkYHvrjOYu01Crgjb1hcAEI9jRvYzyoIE6lxlrilJfStyGy+mEY= ; Message-ID: <20060618025541.91508.qmail@web31110.mail.mud.yahoo.com> Received: from [218.111.152.157] by web31110.mail.mud.yahoo.com via HTTP; Sat, 17 Jun 2006 19:55:41 PDT Date: Sat, 17 Jun 2006 19:55:41 -0700 (PDT) From: Infor Gates Subject: Re: pg_restore To: Tom Lane Cc: pgsql-admin@postgresql.org In-Reply-To: <21690.1150562331@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-941475155-1150599341=:90266" Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/142 X-Sequence-Number: 22104 --0-941475155-1150599341=:90266 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Dear Tom Thanks for your email. You are right in saying table is already populated with the data. I was testing the pg_dump and pg_restore using pg_Admin III. I am having the impression that pg_restore would over-rides the "old" data with the current one. Is my thinking wrong? I have checked the documentation but it was silence on this. Does it means that whenever I performed a pg_restore, I must first drop the "old" database. I would be glad if you can help to clarify my understanding on pg_dump and pg_restore functions. Thank you. CY Tom Lane wrote: Infor Gates writes: > I hope you could help me understand the error message below: > While it looks straight forward, I could NOT find the duplicate key violation, Considering that it's complaining at the very first line of COPY data, I wonder whether you aren't restoring into a table that already contains the data you want to load. pg_restore doesn't (by default) try to delete data that's already present. regards, tom lane --------------------------------- Yahoo! Groups gets better. Check out the new email design. Plus there’s much more to come. --0-941475155-1150599341=:90266 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Dear Tom

Thanks for your email.

You are right in saying table is already populated with the data. I was
testing the pg_dump and pg_restore using pg_Admin III.

I am having the impression that pg_restore would over-rides the "old"
data with the current one. Is my thinking wrong?  I have checked the
documentation but it was silence on this.  Does it means that whenever
I performed a pg_restore, I must first drop the "old" database.

I would be glad if you can help to clarify my understanding on
pg_dump and pg_restore functions.

Thank you.

CY


Tom Lane <tgl@sss.pgh.pa.us> wrote:
Infor Gates writes:
> I hope you could help me understand the error message below:
> While it looks straight forward, I could NOT find the duplicate key violation,

Considering that it's complaining at the very first line of COPY data,
I wonder whether you aren't restoring into a table that already contains
the data you want to load. pg_restore doesn't (by default) try to
delete data that's already present.

regards, tom lane


Yahoo! Groups gets better. Check out the new email design. Plus there’s much more to come. --0-941475155-1150599341=:90266--