[Zope] ZPygreSQL woes

nathan frund ndf@rocketmail.com
Tue, 27 Jul 1999 12:54:50 -0700 (PDT)


Using PyGreSQL 2.4 did the trick.  If anyone else has
the same problems here's what I did:

Of course I downloaded PyGreSQL 2.4 and unarchived it. 

I copied the contents on top of the DA that bombed
out- to $Zope (Where ever you installed
Zope)/lib/python/Products/PyGreSQLDA/src 

Re-ran make.  

Restarted Zope.  

Everything worked!

Thanks for everyone's help.




---TFE MMS JARVIS JOHN <jarvis.sd082@ex.tel.co.jp>
wrote:
>
> I found that getresult in pg.py was dumping core.
> It turns out that this is a known bug.
> 
> According to http://www.druid.net/pygresql/ , it 
> has been fixed in PyGreSQL version 2.4
> 
> The version that came with the DA is 2.3.
> --
> 
> John Jarvis
> 
> > -----Original Message-----
> > From:	TFE MMS JARVIS JOHN
[SMTP:jarvis.sd082@ex.tel.co.jp]
> > Sent:	Tuesday, July 27, 1999 10:56 AM
> > To:	nathan frund; zope@zope.org
> > Subject:	RE: [Zope] ZPygreSQL woes
> > 
> > oh...
> > This query outright crashes Zope on my system!
> > 
> 	<SNIP> 
> > --
> > John Jarvis
> > 
> > > -----Original Message-----
> > > From:	nathan frund [SMTP:ndf@rocketmail.com]
> > > Sent:	Tuesday, July 27, 1999 2:04 AM
> > > To:	Hannu Krosing
> > > Cc:	zope@zope.org
> > > Subject:	Re: [Zope] ZPygreSQL woes
> > > 
> > > 
> > > ---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
> > > 
> > > 
> > > _______________________________________________
> > > Zope maillist  -  Zope@zope.org
> > > http://www.zope.org/mailman/listinfo/zope
> > > 
> > > (To receive general Zope announcements, see:
> > >
http://www.zope.org/mailman/listinfo/zope-announce
> > > 
> > > For developer-specific issues,
zope-dev@zope.org -
> > > http://www.zope.org/mailman/listinfo/zope-dev )
> > 
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://www.zope.org/mailman/listinfo/zope
> > 
> > (To receive general Zope announcements, see:
> > http://www.zope.org/mailman/listinfo/zope-announce
> > 
> > For developer-specific issues, zope-dev@zope.org -
> > http://www.zope.org/mailman/listinfo/zope-dev )
> 

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com