Pg_Restore with --clean option

From: Jyoti Seth <jyotiseth2001(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Pg_Restore with --clean option
Date: 2009-10-01 05:14:41
Message-ID: 25693180.post@talk.nabble.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql


I want to restore data of a single table. Before restoring the data I
disabled all the triggers and constraints on that table. I used the restore
command with --clean option so that data gets deleted from that table and
then fresh data get inserted.
But this is throwing error: duplicate key value violates unique constraint.

How can I restore the data to a table that already has data?

Thanks,
--
View this message in context: http://www.nabble.com/Pg_Restore-with---clean-option-tp25693180p25693180.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2009-10-01 06:05:53 Re: Pg_Restore with --clean option
Previous Message Tom Lane 2009-09-29 14:13:05 Re: Disable Constraints in Postgresql 8.4