Serializable transactions and SQLException

From: Giampaolo Tomassoni <g(dot)tomassoni(at)libero(dot)it>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Serializable transactions and SQLException
Date: 2004-10-28 15:11:21
Message-ID: 200410281711.21440.g.tomassoni@libero.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dears,

I would like to develop java code using the pgsql-jdbc driver on serializable
isolated transactions. The (general) pgsql manual states that this, of
course, may cause concurrent updating transaction failures to inform the
client to retry the transaction as a whole.

This is said to be reported by the error message:

ERROR: Can't serialize access due to concurrent update

Great. I want to cope with it. But what's the SQLException.getSQLState() value
associated to this? Or is it a SQLException.getErrorCode()? Is this value
something 'standard', in the sense that, ie., if I need to switch to Oracle
it works fine? Is there a better way to identify 'please, retry' suggestions
than browsing the SQLException object?

It is possible I didn't search enough, but it is a matter of fact that I
didn't find any information about it. Please spare a word about it.

Regards,

Giampaolo Tomassoni

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message skeize@gmail.com 2004-10-28 18:54:33 Setting up JDBC on a Windows Platform (PostgreSQL)
Previous Message Oliver Jowett 2004-10-28 02:18:13 PGobject overhaul (was Re: tightening up on use of oid 0)