X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E43C63A3C21 for ; Thu, 28 Oct 2004 16:11:46 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25028-04 for ; Thu, 28 Oct 2004 15:11:37 +0000 (GMT) Received: from smtp2.libero.it (smtp2.libero.it [193.70.192.52]) by svr1.postgresql.org (Postfix) with ESMTP id C5EE73A2B4A for ; Thu, 28 Oct 2004 16:11:36 +0100 (BST) Received: from localhost (172.16.1.79) by smtp2.libero.it (7.0.027-DD01) id 40C7347601D37263 for pgsql-jdbc@postgresql.org; Thu, 28 Oct 2004 17:12:03 +0200 Received: from ppp-58-19.27-151.libero.it (151.27.19.58) by smtp20.libero.it (7.0.027-DD01) id 40E3F8E20492B309 for pgsql-jdbc@postgresql.org; Thu, 28 Oct 2004 17:11:34 +0200 From: Giampaolo Tomassoni To: pgsql-jdbc@postgresql.org Subject: Serializable transactions and SQLException Date: Thu, 28 Oct 2004 17:11:21 +0200 User-Agent: KMail/1.5.1 X-Guess-Who: That's me! MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410281711.21440.g.tomassoni@libero.it> X-Virus-Scanned: by amavisd-new at libero.it serv1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/292 X-Sequence-Number: 11397 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