Re: COPY error handling - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: COPY error handling
Date
Msg-id 20040607041136.GB17952@wolff.to
Whole thread Raw
In response to COPY error handling  (Bricklen <bricklen-rem@yahoo.comz>)
Responses Re: COPY error handling  (Bricklen <bricklen-rem@yahoo.comz>)
List pgsql-general
On Fri, Jun 04, 2004 at 14:11:19 +0000,
  Bricklen <bricklen-rem@yahoo.comz> wrote:
> Hi, I'm not sure if this is the correct group for this question, but
> I'll post it hoping that it is.
> I'm loading several ~15 million row files into a table using the COPY
> command. Apparently one of the rows, about 6 million in, has an invalid
> entry. This is causing the COPY command to fail, so my question is this:
> Is there any way to skip invalid rows? Or send them to a separate log
> file etc to go through later?
> I've gone through the docs, but I didn't see anything specific to this.
> Any information, links, or hints are greatly appreciated.

Currently there isn't a builtin way to do this. You can pass the data
through a filter script that removes rows that are not in a proper format.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: tsearch2 queries faster than expected
Next
From: Bruno Wolff III
Date:
Subject: Re: Updating a unique constrant