Re: COPY function and error log

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: "Patrick Hatcher" <PHatcher(at)macys(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: COPY function and error log
Date: 2002-03-01 17:47:46
Message-ID: web-814023@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Clinton Adams 2002-03-01 22:50:51 select into ...outfile
Previous Message Bertil Wergelius 2002-03-01 17:39:35 Re: sorting order