Re: Removing our datasource/pooling implementation. - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Removing our datasource/pooling implementation.
Date
Msg-id 41E71F87.90400@opencloud.com
Whole thread Raw
In response to Re: Removing our datasource/pooling implementation.  (Kris Jurka <books@ejurka.com>)
Responses Re: Removing our datasource/pooling implementation.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
Kris Jurka wrote:

> That could work, although coming up with the list of fatal states might be
> tricky.  I've never paid much attention to the sql states that the driver
> assigns itself, this might be the time to change that and remove the
> PSQLException constructor that doesn't take a PSQLState argument.

I've committed some changes that do this.

Some of the SQL states I assigned aren't very good matches. The main one
is that "you can't do that operation on that sort of object" type of
error is mapped to "object not in prerequisite state". Any better ideas?

PooledConnectionImpl has a list of SQL state classes that are considered
fatal, and inspects each thrown exception's SQL state to see whether to
tell the connection listener about the error.

I also changed the default autocommit setting for our CPDS
implementation to true to be consistent with normal connections & the
JDBC spec. I seem to remember this was discussed on the list ages ago
but I guess nothing ever got changed at the time.

-O

pgsql-jdbc by date:

Previous
From: Jerome Colombie
Date:
Subject: Re: Encoding Problem
Next
From: Oliver Siegmar
Date:
Subject: Re: Problems with infinity