Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: DB

Seeking help with Accessing Zope from PostgreSQL

 

 

Zope db RSS feed   Index | Next | Previous | View Threaded


ken at sunward

Nov 12, 2007, 8:37 AM

Post #1 of 1 (1441 views)
Permalink
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 [at] zope
http://mail.zope.org/mailman/listinfo/zope-db

Zope db RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.