Re: SQLException.getErrorCode ?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Kris Jurka" <books(at)ejurka(dot)com>,<maxime(dot)levesque(at)gmail(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: SQLException.getErrorCode ?
Date: 2010-05-01 18:25:17
Message-ID: 4BDC2BBD0200002500031157@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Kris Jurka <books(at)ejurka(dot)com> wrote:

> As I said earlier you need to check SQLException.getSQLState, not
> getErrorCode.

Why anyone would want to use error code instead of SQLSTATE is
beyond me, but since they're out there, perhaps we should implement
getErrorCode to interpret SQLSTATE as a base 36 number, and return
that number? It might take less time than fielding the next
complaint. ;-)

If that sounds good, I could whip together a patch for it.

The biggest down side is that we'd have to document it....

-Kevin

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2010-05-01 19:44:21 Re: SQLException.getErrorCode ?
Previous Message Nookala Satish Kumar 2010-05-01 17:09:16 Re: Glassfish ignoring "ssl" property in connection pool of PostgreSQL