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

From Lee Kindness
Subject Re: Bulkloading using COPY - ignore duplicates?
Date
Msg-id 15391.26877.931767.773950@elsick.csl.co.uk
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:> Lee Kindness <lkindness@csl.co.uk> writes:> > In an ideal world 'COPY FROM' would only be used with
dataoutput by> > 'COPY TO' and it would be nice and sanitised. However in some fields> > this often is not a
possibilitydue to performance constraints!> Of course, the more bells and whistles we add to COPY, the slower it> will
get,which rather defeats the purpose no?
 

Indeed, but as I've mentioned in this thread in the past, the code
path for COPY FROM already does a check against the unique index (if
there is one) but bombs-out rather than handling it...

It wouldn't add any execution time if there were no duplicates in the
input!

regards, Lee.


pgsql-hackers by date:

Previous
From: mlw
Date:
Subject: Re: Concerns about this release
Next
From: Tom Lane
Date:
Subject: Re: Concerns about this release