Re: when COPY violates Primary Keys

Поиск
Список
Период
Сортировка
От Chris
Тема Re: when COPY violates Primary Keys
Дата
Msg-id 48EE9731.2090702@gmail.com
обсуждение исходный текст
Ответ на when COPY violates Primary Keys  (Joao Ferreira gmail <joao.miguel.c.ferreira@gmail.com>)
Ответы Re: when COPY violates Primary Keys  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Список pgsql-general
Joao Ferreira gmail wrote:
> Hello all,
>
> I have a ascii dump file based on the COPY operation.
>
> lets say I restore this dump into a live database with applications
> doing INSERTs and UPDATEs onto it.
>
> in case the COPY of a register causes a primary key (or UNIQUE, or FK)
> violation does the psql restore command try to continue the operation
> until it has parsed the whole dump, or does it abort on the first
> violation ?

Copy is all or nothing. It'll abort as soon as a violation happens.

the bulkloader on pgfoundry (http://pgfoundry.org/projects/pgbulkload/)
can apparently handle this for you...

--
Postgresql & php tutorials
http://www.designmagick.com/


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

Предыдущее
От: "David Wilson"
Дата:
Сообщение: Re: Question About UNION
Следующее
От: ITAGAKI Takahiro
Дата:
Сообщение: Re: when COPY violates Primary Keys