Re: JDBC changes for 7.2... some questions... - Mailing list pgsql-jdbc

From Barry Lind
Subject Re: JDBC changes for 7.2... some questions...
Date
Msg-id 3B86B51E.3090205@xythos.com
Whole thread Raw
In response to Re: JDBC changes for 7.2... some questions...  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-jdbc
The reason why it isn't accessible is that some implementations of
connection pools (including one I have written), return a wrapper object
around the connection object.  This wrapper object just implements the
java.sql.Connection interface defined by the jdbc spec.  If the wrapped
connection (an org.postgresql.Connection object in this case) has extra
methods (such as getInsertedOID()) there is no way to access those extra
methods as the wrapper does not contain them.

If you were using the postgres connection object directly you would
simply cast the object to an org.postgresql.Connection and then you
would be able to access the extra methods.  But you can't in this case
because you are dealing with a wrapper object (i.e. something like
com.foo.connectionpool.Connection).

thanks,
--Barry

Peter Eisentraut wrote:
> Ned Wolpert writes:
>
>
>>  Now, I understand that in the Statement class, we have getInsertedOID() in the
>>table.  However, the problem we run into is that this isn't accessiable if we
>>use something like poolman to provide database pooling of connections.  (You
>>get the poolMan Statement object which is wraps the Statement classes of the
>>driver.)
>>
>
> I think no one has asked yet *why* it isn't "accessible".
>
> Maybe the getInsertedOID function needs to be moved to some other class?
>
>



pgsql-jdbc by date:

Previous
From: Ned Wolpert
Date:
Subject: Re: JDBC changes for 7.2... some questions...
Next
From: Bruce Momjian
Date:
Subject: Re: [BUGS] Bug #428: Another security issue with the JDBC driver.