skip duplicate key error during inserts

Поиск
Список
Период
Сортировка
От Jean-Christophe Roux
Тема skip duplicate key error during inserts
Дата
Msg-id 20061020150150.14462.qmail@web35301.mail.mud.yahoo.com
обсуждение исходный текст
Ответы Re: skip duplicate key error during inserts  ("Merlin Moncure" <mmoncure@gmail.com>)
Re: skip duplicate key error during inserts  ("Jeffrey Webster" <icwebby@gmail.com>)
Список pgsql-general
Hello,
I have a table like this:
create table dummy (value integer primary key);
and I insert a row like this
insert into dummy values(0);
then I want to insert three rows:
insert into dummy values(0);
insert into dummy values(1);
insert into dummy values(2);

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

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

Предыдущее
От: Shane Ambler
Дата:
Сообщение: Re: why not kill -9 postmaster
Следующее
От: John Sidney-Woollett
Дата:
Сообщение: Upgrade 7.4 to 8.1 or 8.2?