From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tomeh, Husam <htomeh@firstam.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: COPY command and skipping errors
Date: Thu, 22 Sep 2005 16:41:57 -0400 (EDT)
Message-ID: <200509222041.j8MKfvj03938@candle.pha.pa.us> (raw)
In-Reply-To: <C45835824D00A844BBD0F032D5CDED920116DD4E@pisgana01sxch01.ana.firstamdata.com>
Tomeh, Husam wrote:
>
> Is there a way to skip errors during the run of the COPY command
> (loading data from a file to a table) like what Oracle SQL*Loader has?
> The reason I'm asking is that if the extract file from the mainframe has
> an invalid character, the COPY terminates and doesn't continue loading
> the rest of records.
No, but it is on the TODO list:
o Allow COPY to report error lines and continue
This requires the use of a savepoint before each COPY line is
processed, with ROLLBACK on COPY failure.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: pgman@candle.pha.pa.us, htomeh@firstam.com
Subject: Re: COPY command and skipping errors
In-Reply-To: <200509222041.j8MKfvj03938@candle.pha.pa.us>
References: <C45835824D00A844BBD0F032D5CDED920116DD4E@pisgana01sxch01.ana.firstamdata.com> <200509222041.j8MKfvj03938@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox