Re: Foreign key constraint & getErrorCode

From: Ian Pilcher <i(dot)pilcher(at)comcast(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Foreign key constraint & getErrorCode
Date: 2004-09-11 02:33:41
Message-ID: chto65$pf2$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)pilcher(at)comcast(dot)net
========================================================================

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2004-09-11 07:19:34 Re: JDBC driver for Postgresql 7.5-devel version
Previous Message Oliver Jowett 2004-09-10 22:43:46 Re: Foreign key constraint & getErrorCode