Re: Exception Identification - What to do with no codes?

From: Derek S <cube-soft(at)rogers(dot)com>
To: John Cavacas <oogly(at)rogers(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Exception Identification - What to do with no codes?
Date: 2003-02-15 00:33:06
Message-ID: 3E4D8AC2.4010601@rogers.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I considered a similar solution to that, and in controlled
circumstances, it would probably work. It has two unfortunate
consequences though:
A) if the jdbc driver changes, you're out of luck and
B) if the user has different language settings, again, out of luck.

For me, those are very significant considerations, because this is for
an office app where I won't have complete control over the environment
and localization support for at least two languages (english and french)
is a requirement.

I'm really hoping that I can find a better idea than that, because while
it is probably possible for that to work ... well it just doesn't sit
right with me. I'd be willing and happy to contribute to the current
efforts to add error code support to the back end, but I don't really
know where to start and I'm not a terrific C programmer either way. Are
there any other solutions out there?

regards,
Derek

John Cavacas wrote:

>Anyway, with this framework and the JDBC part of it, you can implement
>that sort of solution. The JDBC framework has a custom
>SQLExceptionTranslator interface that you can implement for custom SQL
>exceptions. The author include a Oracle implementation of this class,
>and since Oracle supports error codes, the solution is very clean. My
>idea is to create a PostgreSQL implementation of this interface, but
>since there are no error codes in PostgreSQL, I was going to parse out
>strings... yep, problably not the fastest thing on the planet but I'm
>going to attempt it and see how it works out.
>
>
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message John Cavacas 2003-02-15 01:14:47 Re: Exception Identification - What to do with no codes?
Previous Message John Cavacas 2003-02-14 23:36:01 Re: Exception Identification - What to do with no codes?