Re: COPY function and error log - Mailing list pgsql-novice

From Josh Berkus
Subject Re: COPY function and error log
Date
Msg-id web-814023@davinci.ethosmedia.com
Whole thread Raw
In response to COPY function and error log  ("Patrick Hatcher" <PHatcher@macys.com>)
List pgsql-novice
Patrick,

> If there function besides COPY that will let me import data from a
>  flat
> file and continue if an error occurs?

No.  Use a scripting language, such as Perl, PHP, BASH Shellscript, or
 VB to do this.   It's what scripting languages are designed for.
  Heck, you could even use a combo of PgAdminII and MS Access.

If you're not up to doing this, it's a trivial task for a Perl hacker
 or PHP wiz.  2 hours work, tops.

>This was a great functionality
>  of
> the MS SQL import that would log the offending error row into an
>  error log.

When it works.  YMMV, but as an ex-certified MSSQL Server admin, DTS
 failed as often as it succeeded.  I even had MS return my per-incident
 fee on a couple of DTS errors because they couldn't fix them ...

-Josh Berkus

pgsql-novice by date:

Previous
From: Bertil Wergelius
Date:
Subject: Re: sorting order
Next
From: Clinton Adams
Date:
Subject: select into ...outfile