Skip site navigation (1) Skip section navigation (2)

Re: pg_restore

From: Infor Gates <info_gates(at)yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_restore
Date: 2006-06-18 02:55:41
Message-ID: (view raw or whole thread)
Lists: pgsql-admin
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.


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.  

In response to


pgsql-admin by date

Next:From: Tom LaneDate: 2006-06-18 05:06:36
Subject: Re: pg_restore
Previous:From: Farrell,BobDate: 2006-06-17 17:01:13
Subject: Win32 2003 Front end

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group