Re: How to implement the skip errors for copy from ?

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: How to implement the skip errors for copy from ?
Дата
Msg-id 5387356E.7080802@dalibo.com
обсуждение исходный текст
Ответ на How to implement the skip errors for copy from ?  (xbzhang <xbzhang@kingbase.com.cn>)
Список pgsql-general
On 05/29/2014 09:25 AM, xbzhang wrote:
body { line-height: 1.5; }p { margin-top: 0px; margin-bottom: 0px; }body { font-size: 10.5pt; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0); line-height: 1.5; }
I want to implement the skip errors for copy from,lik as :
create table A (c int primary key);
copy A from stdin;
1
1
2
\.

copy will failed:
ERROR: duplicate key violates primary key constraint "CC_PKEY"
CONTEXT: COPY CC, line 2: "1"

I want skip the error, and continue to copy the reset of tuple. The result
will be that there are two rows in table A: 1 and 2.

how to implement that ?

Have a look at pgloader. http://pgloader.tapoueh.org/
-- 
Vik

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Fwd: libpq: indefinite block on poll during network problems
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: How to implement the skip errors for copy from ?