Best Way to handle duplicate key exceptions

From: "Peter Neu" <peter(dot)neu(at)gmx(dot)net>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Best Way to handle duplicate key exceptions
Date: 2006-07-27 11:42:24
Message-ID: 002001c6b171$ba67e670$bcc8a8c0@PCMELZER
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello,

what is he best way to handle duplicate key exceptions? When I do bulk
import I don't want
the insert process to fail simply because somebody gave me an inconsistent
csv file.

Is there simple way to tell Postgres to simply insert everything that is
good and let me log the errors?

Cheers,
Pete

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Koth, Christian (DWBI) 2006-07-28 08:39:55 Using ON_ERROR_ROLLBACK functionality in JDBC
Previous Message Roland Walter 2006-07-27 09:25:32 Re: Simple way to manage users with JDBC/Servlets?