skipping records with duplicate key during COPY - Mailing list pgsql-novice

From Devinder K Rajput
Subject skipping records with duplicate key during COPY
Date
Msg-id OFA585A509.CC7CFFD7-ON86256C93.0068E08F@ipaper.com
Whole thread Raw
Responses Re: skipping records with duplicate key during COPY
List pgsql-novice

Hi,
        I am using COPY command to load a data table.  When I try to insert a record with a duplicate key, I get the error message "cannot insert a duplicate key into unique index" and no data is loaded into the table.  I know that this is the way the COPY command works.  Now, is there a way in which I can load a table and if duplicate records do come up, write them to an error file, but still load the other good records into the table?  *I think* one of accomplishing this is by performing inserts of individual records, but that would be very slow.  any suggestions?

TIA,

Devinder

pgsql-novice by date:

Previous
From: "Patrick Hatcher"
Date:
Subject: Re: Cant group by non integer - ms access - odbc
Next
From: "Devinder K Rajput"
Date:
Subject: Reserved Word