[Zope] Re: Fwd: Re: [Zope] PoPy module

Thierry MICHEL thierry@geltrude.mixad.it
Mon, 5 Jun 2000 10:54:22 +0200


On Mon, Jun 05, 2000 at 10:25:20AM +0200, pcm@mixadlive.com wrote:
> 
> 
> ------ Forwarded message ------
>       Da: jani <jani@ahit.de>
> Soggetto: Re: [Zope] PoPy module
>     Data: Sun, 04 Jun 2000 20:14:03 -0700
>        A: Alexander N Gould <agould@student.umass.edu>
>    Copia: zope@zope.org
> 
> Alexander N Gould wrote:
> > 
> > I'm trying to install the PoPy Python module on my Yellowdog Linux system
> > (a redhat clone for PowerPC hardware).  I'm sure it's a simple task, but I
> > don't know how to do it.  Any suggestions or tips?  Thanks in advance.
> > 
> > Building highways to reduce traffic is like loosening your belt to reduce
> > obesity
> 
> First make sure that pyton-devel is installed on your system. 
> It's available at www.python.org I think.
> 
> Untar PoPy-1.1.tar.gz and ZPoPyDA-0.3.tar.gz .
> First you have to build PoPy. 
> On my system I had to modify the lib and include path in Setup and
> in PoPymodule.c
> 
> Setup:
> *shared*
> PoPy PoPymodule.c -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -lpr
> 
> PoPymodule.c:
> ...
> #include <libpq-fe.h>
> #include <libpq/libpq-fs.h>
> ...
> 
> Go on with:
> make -f Makefile.pre.in boot
> make
> 
> You should now have the shared library PoPymodule.so .
> Copy this file to python1.5/site-packages on your system.

With make install, it compiles and installs directly in the python1.5/site-packages.
 
> Now you have to install zope-popyda-0.3
> "make install" will place the Zope product to
> /usr/lib/zope/lib/python/Products/ZPoPyDA
> 
> Just move it to the Product folder of your Zope installation.
> Restart Zope and it should work ;-)
> 
> Take a look at the README. It describes the format of the connection
> string.
> It's different from that of PyGreSQLDA!
> Also make sure that you hav set proper permissions on
> &PGDATA/pg_hba.conf
> 
> BTW after i recognized some problems using PoPy I switched back to
> PyGreSQLDA.

> 1. When I try to connect to postgres 6.4 using PoPy the connect fails
>    postgres.log: ERROR: parser: parse error at or near "transaction"

Postgres 6.4 seems not being SQL 92 compliant for the transactions !
PoPy is ! pygresql no certtainly !
 
> 2. Whether Auto-commit mode is on or off on ZPoPyDA  the new postgres
> 7.0 syntax 
>  "select * from foo limit 20 offset 10" returns all records of foo and
> not only 20 !
>   With PyGreSQLDA it works :-)

That's running every where, it's strange that's not running on your system.
Do you have packed the database of Zope ? Do you have create a new object ?

PygresqlDA runs ok because it doesn't deal with cursors ... :-)

Thierry
thierry@mixadlive.com

 
> -- 
> _________________________________________________________
> Andreas Heckel                            andreas@aHIT.de
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> 
>