Re: skip duplicate key error during inserts

Поиск
Список
Период
Сортировка
От Jeffrey Webster
Тема Re: skip duplicate key error during inserts
Дата
Msg-id 8c0cc2820610220239r62ff82dap95d756e17bfe8413@mail.gmail.com
обсуждение исходный текст
Ответ на skip duplicate key error during inserts  (Jean-Christophe Roux <jcxxr@yahoo.com>)
Ответы Re: skip duplicate key error during inserts  (Ron Johnson <ron.l.johnson@cox.net>)
Список pgsql-general


On 10/20/06, Jean-Christophe Roux <jcxxr@yahoo.com> wrote:
Hello,
[snip]

 

none of them will be inserted because the first insert is a primary key violation. How can I have postgreSQL not mind about the error and proceed to the next insert. I could send the inserts one at a time but bundling them speeds up the process.
Thanks


I feel your pain... However, there is no way to do this (currently?).  Some possible solutions had been suggested some time back by a colleague, but they were rejected.  It requires a source code change (and not a simple one, at that) to implement.

Until a concensus is reached by the primary contributors there is no easy answer.

We've resorted to batch loading and parsing error messages to load all data between primary key violations.  It's still considerably more efficient than single inserts.

(we've got the code to accomplish what you're asking about in the attic... hopefully something will come of it some day.)

Best of luck.

В списке pgsql-general по дате отправления:

Предыдущее
От: Thomas Pundt
Дата:
Сообщение: Re: How to find out about zlib compression
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: skip duplicate key error during inserts