duplicate key value violates unique constraint "tableName_pk"

From: Saravanan Nagarajan <n(dot)saravanan86(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Cc: Saravanan Nagarajan <n(dot)saravanan86(at)gmail(dot)com>
Subject: duplicate key value violates unique constraint "tableName_pk"
Date: 2012-11-07 11:21:14
Message-ID: CANYLzthssbdi4LSYmL9NJ6XsHJcm=Ni8qBMEJtzuij4jCO7Gtw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi ,

I am using "Copy From" while dumping bulk data into PGSQL DB from file.
While I am trying to insert the rows, if the primary key already exists,
the complete transaction terminated.

Postgres cannot handle the constraint violations , i found it into
http://wiki.postgresql.org/wiki/COPY#Caveats_with_implementation .

Is there any possible way to insert bulk data using "Copy From" with
REPLACE/IGNORE duplicates.

Thanks & Regards

Saravanan.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2012-11-07 14:53:00 Re: Bug reporting form :-(
Previous Message Denis Feklushkin 2012-11-07 02:33:10 PQsendQueryParams() causes prepared statement error