Re: SQLException.getErrorCode ? - Mailing list pgsql-jdbc

From Lew
Subject Re: SQLException.getErrorCode ?
Date
Msg-id hrlja3$dl7$1@news.albasani.net
Whole thread Raw
In response to Re: SQLException.getErrorCode ?  (Maxime Lévesque <maxime.levesque@gmail.com>)
List pgsql-jdbc
On 05/01/2010 08:17 PM, Maxime Lévesque wrote:
>
>   I was just thinking that putting the getSQLState string in the
> exception's toString
> message would go a long way in hinting the users that postgres [sic] does
> provide error codes.

Umm, the SQLException documentation is quite clear the 'getErrorCode()'
returns only vendor-specific codes and that 'getSQLState()' returns the SQL
state value.  Since the latter is standard and the former is not, that already
"goes a long way [to] hinting ... that" PG provides SQL Standard codes.
Nothing further is needed.
<http://java.sun.com/javase/6/docs/api/java/sql/SQLException.html>

It seems fair that there is a presumption of knowledge of the standard.

--
Lew

pgsql-jdbc by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Driver not returning the type for TYPEs
Next
From: Bruno De Fraine
Date:
Subject: Bug: SimpleParameterList and resolved types