From: Maxime Lévesque <maxime.levesque@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: SQLException.getErrorCode ?
Date: Sat, 1 May 2010 12:11:21 -0400
Message-ID: <p2m554f5f781005010911te9f69ab9v12f20c3f2139e359@mail.gmail.com> (raw)
The method SQLException.getErrorCode of the jdbc driver systematically
returns 0,
From what I have found on the web, the server doesn't have good support for
error codes,
and it is the reason the jdbc driver doesn't return error codes.
The doc here talks about error codes :
http://www.postgresql.org/docs/8.4/interactive/errcodes-appendix.html
Where are error codes support on the roadmap ?
I would like to detect things like 'table does not exist' , constraint does
not exist, etc.. from the SQLException
Is there a workaround ?
Thanks
And thanks for the quick replies to my previous questions ! ;-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: maxime.levesque@gmail.com
Subject: Re: SQLException.getErrorCode ?
In-Reply-To: <p2m554f5f781005010911te9f69ab9v12f20c3f2139e359@mail.gmail.com>
References: <p2m554f5f781005010911te9f69ab9v12f20c3f2139e359@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox