[Zope] best postgreSQL adapter?

ender kthangavelu@earthlink.net
Thu, 8 Mar 2001 17:17:39 -0800


On Thursday 08 March 2001 10:53, Joshua wrote:
>>I'm curious as to which PostgreSQL zope adapter is most solid. I'm looking
>>to build what will eventually have fairly heavy traffic database usage.
>>Let's see...I found:

>>
>>psycopg/ZpsycopgDA
>>ZPyGreSQLDA
>>PoPy

fyi another postgres python adaptor (a very nice one at that) is pgsql at 
http://sourceforge.net/projects/pgsql

i would recommend ZPoPy for a da at this time... but

if you're going to be connect to postgres outside of zope i recommend not 
using PoPy. Its regularly crashes python for me when i try to do things any 
heavy db work from outside zope. heavy constituting using bind variables, 
stored procs, checking rowcount, description, etc. in accessing postgres 
external to zope i'd recommend using pygresql (the native non-standard 
interface not the dbi wrapper) or pgsql.

one thing to not about ZPygre is that it synchronizes all db access. if 
you're making lots of small queries this is not the adaptor for you. if 
you've got some large queries you're better off testing both and seeing which 
one gives you better throughput (probably PoPy, buts it not a sure thing).


>>any others?  psycopg mentions that it is designed for heavy multi threaded
>>operations but popy seems more developed.

psycopg has interesting arch, but if you're using postgres its good to keep 
in mind that libpq (the c client interface to postgres) does not support 
multiple threads sharing a connection. psycopg does internal bookeeping in 
the module itself after a connect to keep around a pool of connections. when 
it matures it should be a very good postgres adaptor for zope.

cheers kapil