Re: JDBC squirrely transaction behavior??
От | Joachim Achtzehnter |
---|---|
Тема | Re: JDBC squirrely transaction behavior?? |
Дата | |
Msg-id | Pine.LNX.4.21.0006050919100.19799-100000@penguin.kraut.bc.ca обсуждение исходный текст |
Ответ на | Re: JDBC squirrely transaction behavior?? (Steve Wampler <swampler@noao.edu>) |
Список | pgsql-interfaces |
Today, in a message to postgres-interfaces, Steve Wampler wrote: > > Hmmm, that may cause me a problem in a similar situation - I want to > do an update whenever an insert fails. There was a discussion about this in several Postgresql mailing lists a few weeks ago. Postgresql currently doesn't support statement-level abort and instead aborts the whole transaction. Apparently, there is a consensus among the developers that statement-level abort is a good thing to have. Perhaps we will see it some day... Even now you can do this trick the other way around: do an update first, and when the row count is zero insert the row instead. This works because updating zero rows is not an error in SQL. Not sure whether this helps in your situation. Joachim -- work: joachima@realtimeint.com (http://www.realtimeint.com) private: joachim@kraut.bc.ca (http://www.kraut.bc.ca)
В списке pgsql-interfaces по дате отправления: