Re: Fwd: Re: [Zope] PoPy module
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 )
Thierry MICHEL wrote: ...
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 !
OK ... take it as a note for users still working with postgres 6.4 ;-)
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 ... :-)
I of course I packed the Zope database several times. But after I installed PoPy I did not pack it. I only created a Z PoPy Database connection and a Z SQL Method to test the DA. Please reply if I can help you with some logs or version info of my system. -- _________________________________________________________ Andreas Heckel andreas@aHIT.de Programmers don't die, they just GOSUB without RETURN ;-)
On Mon, 05 Jun 2000, Thierry MICHEL wrote:
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 ?
i will vouch for this, although i'm using postgres 6.5 (from rpm). i packed the database, stop and start zope. create a zpopyda connection, and test the connection with SQL query. and limit doesn't work.
PygresqlDA runs ok because it doesn't deal with cursors ... :-)
Thierry thierry@mixadlive.com
"Bak @ kedai" wrote:
On Mon, 05 Jun 2000, Thierry MICHEL wrote:
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 ?
i will vouch for this, although i'm using postgres 6.5 (from rpm). i packed the database, stop and start zope. create a zpopyda connection, and test the connection with SQL query. and limit doesn't work.
It can't worke with postgres 6.5 because it's a NEW FEATURE of postgres 7.0 :-) -- _________________________________________________________ Andreas Heckel andreas@aHIT.de
participants (3)
-
Andreas -
Bak @ kedai -
Thierry MICHEL