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.