Re: JDBC changes for 7.2... some questions...
От | Barry Lind |
---|---|
Тема | Re: JDBC changes for 7.2... some questions... |
Дата | |
Msg-id | 3B86B51E.3090205@xythos.com обсуждение исходный текст |
Ответ на | Re: JDBC changes for 7.2... some questions... (Peter Eisentraut <peter_e@gmx.net>) |
Список | 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 по дате отправления: