Re: Foreign key constraint & getErrorCode - Mailing list pgsql-jdbc

From Ian Pilcher
Subject Re: Foreign key constraint & getErrorCode
Date
Msg-id chto65$pf2$1@sea.gmane.org
Whole thread Raw
In response to Re: Foreign key constraint & getErrorCode  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
Oliver Jowett wrote:
> Try SQLException.getSQLState() instead. The backend returns (somewhat
> standardized) alphanumeric SQL states with errors and the driver exposes
> these as via getSQLState(). getErrorCode() is numeric, vendor-specific,
> and unused by the current driver.

Works like a charm.  Thanks!

(I didn't realize that the PostgreSQL error codes were alphanumeric;
makes it kind of hard to pack into an integer.)

--
========================================================================
Ian Pilcher                                        i.pilcher@comcast.net
========================================================================

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Foreign key constraint & getErrorCode
Next
From: TREPOS Gwenaël
Date:
Subject: JDBC driver for Postgresql 7.5-devel version