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

From Peter Eisentraut
Subject Re: Bulkloading using COPY - ignore duplicates?
Date
Msg-id Pine.LNX.4.30.0110022311470.796-100000@peter.localdomain
Whole thread Raw
In response to Re: Bulkloading using COPY - ignore duplicates?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bulkloading using COPY - ignore duplicates?
List pgsql-hackers
Tom Lane writes:

> It occurs to me that skip-the-insert might be a useful option for
> INSERTs that detect a unique-key conflict, not only for COPY.  (Cf.
> the regular discussions we see on whether to do INSERT first or
> UPDATE first when the key might already exist.)  Maybe a SET variable
> that applies to all forms of insertion would be appropriate.

What we need is:

1. Make errors not abort the transaction.

2. Error codes

Then you can make your client deal with this in which ever way you want,
at least for single-value inserts.

However, it seems to me that COPY ignoring duplicates can easily be done
by preprocessing the input file.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: CVS changes
Next
From: Peter Eisentraut
Date:
Subject: Re: Unicode combining characters