Re: Efficient Insert statement for one record into multiple - Mailing list pgsql-jdbc

From Markus Schaber
Subject Re: Efficient Insert statement for one record into multiple
Date
Msg-id 20061219120352.7ebf0ffc@kingfisher.sec.intern.logix-tt.com
Whole thread Raw
In response to Re: Efficient Insert statement for one record into multiple  ("Peter Neu" <peter.neu@gmx.net>)
List pgsql-jdbc
Hi, Peter,

"Peter Neu" <peter.neu@gmx.net> wrote:

> the insertion within the same connection objects works just fine. ;o)
> One thing which still keeps me thinking is how should I handle duplicate
> key exceptions when it happens in the first insert? Should I just close
> the connection object in the catch clause when this happens in the first
> statement so the second statement hits an AlreadyClosedConnectionException?

Why execute the second statement at all?

Maybe you should rework the control flow of your application.

Regards,
Markus

--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

pgsql-jdbc by date:

Previous
From: "Peter Neu"
Date:
Subject: Re: Efficient Insert statement for one record into multiple
Next
From: Dave Cramer
Date:
Subject: Re: Efficient Insert statement for one record into multiple