SQLException.getErrorCode ?

From: Maxime Lévesque <maxime(dot)levesque(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: SQLException.getErrorCode ?
Date: 2010-05-01 16:11:21
Message-ID: p2m554f5f781005010911te9f69ab9v12f20c3f2139e359@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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 ! ;-)

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2010-05-01 16:20:19 Re: SQLException.getErrorCode ?
Previous Message Kris Jurka 2010-05-01 16:08:52 Re: Strange behavior after setting timestamp field to null - A bug?