Re: error-tolerant COPY FROM - Mailing list pgsql-general

From Sean Davis
Subject Re: error-tolerant COPY FROM
Date
Msg-id 896D4495-76B2-11D9-8DF0-000D933565E8@mail.nih.gov
Whole thread Raw
In response to Re: error-tolerant COPY FROM  ("Joolz" <joolz@arbodienst-limburg.nl>)
List 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 by date:

Previous
From: "Ben-Nes Yonatan"
Date:
Subject: Re: mysql load_file() function
Next
From: Sean Davis
Date:
Subject: Re: error-tolerant COPY FROM