|
Home > Archive > PostgreSQL Administration > September 2005 > COPY command and skipping errors
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
COPY command and skipping errors
|
|
| Tomeh, Husam 2005-09-22, 8:24 pm |
|
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.
Thanks,
--
Husam
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq <http://www.postgresql.org/docs/faq>
********************
********************
********************
**********
This message contains confidential information intended only for the
use of the addressee(s) named above and may contain information that
is legally privileged. If you are not the addressee, or the person
responsible for delivering it to the addressee, you are hereby
notified that reading, disseminating, distributing or copying this
message is strictly prohibited. If you have received this message by
mistake, please immediately notify us by replying to the message and
delete the original message immediately thereafter.
Thank you. FADLD Tag
********************
********************
********************
**********
| |
| Bruce Momjian 2005-09-22, 8:24 pm |
| 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
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
| |
| Alvaro Herrera 2005-09-22, 8:24 pm |
| On Thu, Sep 22, 2005 at 04:41:57PM -0400, Bruce Momjian wrote:
> Tomeh, Husam wrote:
>
> No, but it is on the TODO list:
Also, I think PGLoader can do this. It's on pgfoundry.org.
--
Alvaro Herrera Architect, http://www.EnterpriseDB.com
"Tiene valor aquel que admite que es un cobarde" (Fernandel)
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
|
|
|
|
|