Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group