From: Markus Schaber <schabi@logix-tt.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Efficient Insert statement for one record into multiple
Date: Tue, 19 Dec 2006 12:03:52 +0100
Message-ID: <20061219120352.7ebf0ffc@kingfisher.sec.intern.logix-tt.com> (raw)
In-Reply-To: <00f201c72357$0ba220d0$bcc8a8c0@PCMELZER>
References: <4586C04D.5070008@gmx.net>
<00f201c72357$0ba220d0$bcc8a8c0@PCMELZER>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: schabi@logix-tt.com
Subject: Re: Efficient Insert statement for one record into multiple
In-Reply-To: <20061219120352.7ebf0ffc@kingfisher.sec.intern.logix-tt.com>
References: <4586C04D.5070008@gmx.net> <00f201c72357$0ba220d0$bcc8a8c0@PCMELZER> <20061219120352.7ebf0ffc@kingfisher.sec.intern.logix-tt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox