| От | Adrian Klaver |
|---|---|
| Тема | Re: How to implement the skip errors for copy from ? |
| Дата | |
| Msg-id | 53873631.9090603@aklaver.com обсуждение исходный текст |
| Ответ на | How to implement the skip errors for copy from ? (xbzhang <xbzhang@kingbase.com.cn>) |
| Список | pgsql-general |
On 05/29/2014 12:25 AM, xbzhang wrote: > 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 ? Use an external program like: pgloader http://pgloader.tapoueh.org/ or pg_bulkload http://pgbulkload.projects.pgfoundry.org/pg_bulkload.html > 邮箱:xbzhang@kingbase.com.cn <mailto:xbzhang@kingbase.com.cn> > -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера