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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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?
>
>

In response to

Browse pgsql-hackers by date

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

Browse pgsql-jdbc by date

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