Re: Efficient Insert statement for one record into multiple
От | Dave Cramer |
---|---|
Тема | Re: Efficient Insert statement for one record into multiple |
Дата | |
Msg-id | 30DA21B9-0758-4A54-BC35-D955A2D95B83@fastcrypt.com обсуждение исходный текст |
Ответ на | Re: Efficient Insert statement for one record into multiple ("Peter Neu" <peter.neu@gmx.net>) |
Список | pgsql-jdbc |
If you create the key using nextval you will never get duplicate key exceptions. However, you should never close connections in the catch clause. Always close connections in a finally clause. Dave On 19-Dec-06, at 5:18 AM, Peter Neu wrote: > Hello, > > 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? > > Cheers, > Pete > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that > your > message can get through to the mailing list cleanly >
В списке pgsql-jdbc по дате отправления: