Re: Efficient Insert statement for one record into multiple

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: Efficient Insert statement for one record into multiple
Дата
Msg-id 20061219120352.7ebf0ffc@kingfisher.sec.intern.logix-tt.com
обсуждение исходный текст
Ответ на Re: Efficient Insert statement for one record into multiple  ("Peter Neu" <peter.neu@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: "Peter Neu"
Дата:
Сообщение: Re: Efficient Insert statement for one record into multiple
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Efficient Insert statement for one record into multiple