Re: Bulkloading using COPY - ignore duplicates? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bulkloading using COPY - ignore duplicates?
Date
Msg-id 23149.1001944974@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bulkloading using COPY - ignore duplicates?  (Lee Kindness <lkindness@csl.co.uk>)
Responses Re: Bulkloading using COPY - ignore duplicates?
List pgsql-hackers
Lee Kindness <lkindness@csl.co.uk> writes:
> I see where you're coming from, but seriously what's the use/point of
> COPY aborting and doing a rollback if one duplicate key is found?

Error detection.  If I'm loading what I think is valid data, having the
system silently ignore certain types of errors is not acceptable ---
I'm especially not pleased at the notion of removing an error check
that's always been there because someone else thinks that would make it
more convenient for his application.

> I think it's quite reasonable to presume the input to COPY has had as
> little processing done on it as possible.

The primary and traditional use of COPY has always been to reload dumped
data.  That's why it doesn't do any fancy processing like DEFAULT
insertion, and that's why it should be quite strict about error
conditions.  In a reload scenario, any sort of problem deserves
careful investigation.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Lee Kindness
Date:
Subject: Re: Bulkloading using COPY - ignore duplicates?
Next
From: Tom Lane
Date:
Subject: Re: Bulkloading using COPY - ignore duplicates?