Re: Bulkloading using COPY - ignore duplicates?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bulkloading using COPY - ignore duplicates?
Дата
Msg-id 23149.1001944974@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bulkloading using COPY - ignore duplicates?  (Lee Kindness <lkindness@csl.co.uk>)
Ответы Re: Bulkloading using COPY - ignore duplicates?  (Lee Kindness <lkindness@csl.co.uk>)
Список 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 по дате отправления:

Предыдущее
От: Lee Kindness
Дата:
Сообщение: Re: Bulkloading using COPY - ignore duplicates?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bulkloading using COPY - ignore duplicates?