trapping errors

From: "Thomas Keller" <kellert(at)ohsu(dot)edu>
To: "Postgresql PDX_Users" <pdxpug(at)postgresql(dot)org>
Subject: trapping errors
Date: 2008-10-01 22:41:19
Message-ID: DCA6F319-5499-4039-80A8-1FC4AAEB0393@ohsu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pdxpug

Hi,
I've got a rather complicated csv file whose records I'd like to
insert into a table. I've got most of the records whipped into shape,
but there are a handful that are still getting skipped.

How do I trap them using psql?
That is, I use perl to parse the file and create an insert.sql file. I
use psql with \i to read the file. I'd like to somehow capture the
messages for the records that don't get successfully inserted.

thanks,

Tom
kellert(at)ohsu(dot)edu
503-494-2442

Responses

Browse pdxpug by date

  From Date Subject
Next Message Selena Deckelmann 2008-10-01 22:51:25 October 16 Meeting! Randal + Smalltalk
Previous Message Selena Deckelmann 2008-09-29 19:15:15 [JOB] Fwd: PostgreSQL DBA job - contract to hire