Mailing List Archive

Seeking help with Accessing Zope from PostgreSQL
I'm trying to implement the scheme for "Accessing Zope from PostgreSQL" that
is described in http://zope.org/Members/pupq/zope_in_pg. I'm trying to
implement it in a Plone installation in a WinXP environment (Plone 2.5.2,
Zope 2.9.6, Python 2.4.3, win32, PostgreSQL 8.1.10).

I have changed the file paths in the above reference's zstart() function so
that they refer to the appropriate (I hope) directories and files in my
environment. My zstart() now reads like this:

CREATE or REPLACE FUNCTION public.zstart()
RETURNS pg_catalog.text AS '
if GD.has_key("zope_app"):
GD["app"]._p_jar.sync()
return
import sys
sys.path.insert(0, "\Program Files\Plone 2\Zope\lib\python")
sys.path.insert(0, "\Program Files\Plone
2\Zope\lib\python\Products")
import Zope
sys.argv=["zope"]
Zope.configure("\Program Files\Plone 2\Zope\skel\etc\zope.conf.in")
GD["zope_app"]=Zope.app()
from ZODB.Transaction import get_transaction
GD["zope_get_trans"]=get_transaction
' LANGUAGE 'plpythonu' VOLATILE;

But when I try to run zstart() with this SQL:

select zstart();

I get this error:

PostgreSQL Error Code: (1)
ERROR: plpython: function "zstart" failed
DETAIL: exceptions.SystemExit: 2
0 Record(s) Returned

Any suggestions to make this work?

~ TIA
~ Ken

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