[Zope] PostgreSQL and external method
John VanDyk
jvandyk@iastate.edu
Wed, 20 Jun 2001 14:19:01 -0500
I am trying to hook up a PostgreSQL database to Zope through an
external method.
Here's my method:
def hello():
import sys
from pg import DB
conn = DB('demodb',user='skippy')
x = conn.query("SELECT * from testtable")
return x
It works from the Python command line. But in my Zope page I get
<pg query result>
Also, is there a single best adapter for Postgres? I'm using PyGreSQL
(the FreeBSD port) but I have heard others say it is horribly broken.
I can't seem to find much in the way of documentation for installing
and using the various adapters (psycopyg, PyGreSQL).