Il gio, 2002-01-31 alle 20:55, Jeff Johnson ha scritto:
> I'm trying to subclass DBPool so that it takes the connections out of
> transaction mode when they are created and I'd like to do it in such a
> way that if DBPool is updated, my subclass will still work properly but
> I don't think the hooks are there for it.
>
> My attempt was this:
>
> class DBPoolNoTrans(DBPool):
> def _threadsafe_addConnection(self, con):
> con.cursor().execute("rollback")
> DBPool._threadsafe_addConnection(self, con)
>
> def _unthreadsafe_addConnection(self, con):
> con.cursor().execute("rollback")
> DBPool._unthreadsafe_addConnection(self, con)
>
>
> Unfortunately, the un-thread safe version (postgres) calls addConnection
> every time the connection is returned to the pool. The thread safe
just a question: why is postgres unthreadsafe? (and where do i find the
code for postgresql dbpool? i want to patch it to use psycopg...)
--
Federico Di Gregorio
Debian GNU/Linux Developer & Italian Press Contact [EMAIL PROTECTED]
INIT.D Developer [EMAIL PROTECTED]
The number of the beast: vi vi vi. -- Delexa Jones
msg01639/pgp00000.pgp
Description: PGP signature
