[Zope-DB] Zope and postgreSQL

Jim Penny jpenny@universal-fasteners.com
Mon, 21 Jan 2002 11:48:40 -0500


On Sat, Jan 19, 2002 at 03:49:20PM -0500, Michael Long wrote:
> Hi All,
> 
> I am new to Zope and Python and looking for feedback. I am using a PostgreSQL 
> database with Zope and have seen two ways to connect using either ZPoPyDA2 or 
> ZPyGreSQLDA. I have been having problems getting either one to work in my 
> installation and was wondering what is the best method to use to connect to 
> this database.
> 
> Thanks in advance,
> Mike

Do not use ZPyGreSQLDA.  It is single threaded; this means that if you
get multiple requests, other requests will block until it the first
received is complete.  You get better throughput, but the system feels
much less repsonsive.

You have three reasonable choices.  ZPoPyDA, psycopg, and SQL Relay.
In many ways ZPoPyDA and pycho are similar:  both use a C extension
module.  psyco is more heavily threaded, but PoPy just switched from
using semaphore synconization to Posix threads, also.

Although there is little or no code sharing, the principle authors of
psyco and PoPy worked together at one time, so I am sure that there was
much discussion of how to do things.

I think psyco treats dates and binaries slightly dirrently than PoPy
does; PoPy requires a cast where psyco does not.

I have not worked with psyco, but it is well respected.

Both can be a bit hairy for beginners to set up; in particular, you need
to fined header files for mxdatetime, you need to have header files for
postgres, (and if you are Red Hat based, not all the correct header
files are distributed.)

PoPy has both .rpm and .deb binaries available.  I know that psyco has
.deb's available, and I suspect rpms are available also.

SQL Relay is more interesting in some ways.  It tries to be much more
general, building a front-end which can talk to one of many backends.
In this way, SQL Relay can, at least in principle support about eight
different database systems.  It does connection pooling and other stuff.
If you must work with an odbc database on unix, it is the only current
contender.  (I did not get it to work with an AS/400 backend via ODBC,
but that could easily have been operator error, and I did not have time
to trace the problem to its roots.)

SQL Relay is also intended to work on NT.  Neither PoPy not psyco has
been ported, to my knowledge.  I don't think either would be a hard port
to a person of the right knowledge, but that person has not happened
along just yet.

Anyway, I would choose one of psyco or PoPy.

Just so that you may be aware of any biases, I am debian maintainer of 
PoPy.  

Jim Penny

>  
> 
> 
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://lists.zope.org/mailman/listinfo/zope-db
>