Skip site navigation (1) Skip section navigation (2)

Re: JDBC changes for 7.2... some questions...

From: Barry Lind <barry(at)xythos(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC changes for 7.2... some questions...
Date: 2001-08-24 20:12:14
Message-ID: 3B86B51E.3090205@xythos.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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?
> 
> 



In response to

pgsql-hackers by date

Next:From: Leandro FanzoneDate: 2001-08-24 20:12:19
Subject: gcc 3.0.1
Previous:From: Bruce MomjianDate: 2001-08-24 20:05:57
Subject: Re: Re: nocreatetable for 7.1.2 [patch]

pgsql-jdbc by date

Next:From: David DaneyDate: 2001-08-24 21:16:14
Subject: Re: [BUGS] Bug #428: Another security issue with the JDBC driver.
Previous:From: Ned WolpertDate: 2001-08-24 19:53:55
Subject: Re: JDBC changes for 7.2... some questions...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group