[Zope] ZPygreSQL woes

nathan frund ndf@rocketmail.com
Mon, 26 Jul 1999 10:03:46 -0700 (PDT)


---Hannu Krosing <hannu@trust.ee> wrote:
>
> ndf@rocketmail.com wrote:
> > 
> > I've run into a problem with Zope with
PostgreSQL.  The query runs and
> > runs and runs till all the memory on the server
is used up and Zope
> > falls over. 
> 
> I'm using it all the time with no major problems.
> 
> Do the same queries run fine from psql ?



Yea, even from from 'regular old Python' and with
PGaccess.

Here is the SQL that I used to create the table.
-------------------------------
items.sql
-------------------------------
CREATE TABLE items (
        prodname char(20),
        retailPrice     money,
        description     char(80),
        prodVis char(80),
        IMpartNumber char(20),
        size    float4,
        speed float4,
        color   char(8),
        weight  int8,
        height  int8,
        width int8,
        onhand  int8,
        reorder int8,
        discontinued    boolean,
        supplier        char(20),
        supplierPartNumber      char(20),
        manufacturer    char(16),
        cost    money
);


copy items from stdin using delimiters ',';
"15"" 5VX   
28mm",0,0,0,0,0,0,0,0,0,0,0,0,0,0,9004520,0,200
"17"" 7SP .28mm 1280x1024(1yrs
warr)",0,0,0,0,0,0,0,0,0,0,0,0,0,0,9004190,0,250
"17"" 70+ .28mm
1280x1024",0,0,0,0,0,0,0,0,0,0,0,0,0,0,9004120,0,300
-----------------------------------------------------

psql database < items.sql



Python code that works.
------------------------------------------

from pg import *

cnx=connect('database','localhost',5432)

query=cnx.query('select * from items')
print "\n"

fields=query.listfields()
print fields

------------------------------------------


> Schemas, row counts, queries executed ?


The query with Zope is the same exact query with the
python...  "Select * from items"


It stops even with only three rows in the database. 
The SQL above for me stops Zope and Postgres in their
tracks.


> Also OS, postgres and ZPygreSQLDA versions.


I'm running Red Hat Linux 5.2 with kernel 2.2.9
Python 1.5.2 from Oliver Andrich's site. 
Postgres is version 6.4.2-5.  
ZPyGreSQLDA version is 0.3.
Zope 2.0.0b1 and Zope 1.10.3

I also have python-PyGreSQL-2.3.2.rpm installed.  I
got it from rufus.w3.org.  I removed it thinking that
it conflicted or caused the problem.  But removing it
didn't seem to help so I reinstalled the package.


I haven't tried yet but I'm going to write an
external method and see if that works.


I've put up a lot of info, thanks for your help.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com