Re: error-tolerant COPY FROM

Поиск
Список
Период
Сортировка
От Sean Davis
Тема Re: error-tolerant COPY FROM
Дата
Msg-id 896D4495-76B2-11D9-8DF0-000D933565E8@mail.nih.gov
обсуждение исходный текст
Ответ на Re: error-tolerant COPY FROM  ("Joolz" <joolz@arbodienst-limburg.nl>)
Список pgsql-general
On Feb 4, 2005, at 8:30 AM, Joolz wrote:

> Sean Davis zei:
>> I use a trigger on tables with foreign key references to either
>> ignore
>> the insert row or insert an appropriate matching row in the
>> referenced
> Thanks Sean, but in my situation I don't want the database to be so
> versatile as to handle all the errors itself, this would create
> unneccesary load during all operations on the tables, not only when
> running the import.
>

Just drop the trigger once the table is copied.  In my application (a
hundred thousand to million rows or so per table), using copy rather
than DBI inserts is an order of magnitude or two faster, even with the
triggers in place.

Sean


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

Предыдущее
От: "Ben-Nes Yonatan"
Дата:
Сообщение: Re: mysql load_file() function
Следующее
От: Sean Davis
Дата:
Сообщение: Re: error-tolerant COPY FROM