Re: [Zope-DB] insert failing without raising exception: postgresql, psycopg

2005-11-24 Thread Chris Withers

Dieter Maurer wrote:

[EMAIL PROTECTED] wrote at 2005-11-23 06:51 -0800:


...
I regret that I have not yet learned how to add logging to
ZPsycopgDA, and will appreciate learning how to do so.



It looks like this (ZPsycopgDA/db.py):

from zLOG import LOG, ERROR, INFO, PROBLEM
...

LOG('Postgres', INFO, summary, details)


please don't encourage this old and ugly logging style...

import logging
logger = logging.getLogger('event.Postgres')

logger.info('Count is %i', count)

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

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


Re: [Zope-DB] insert failing without raising exception: postgresql, psycopg

2005-11-22 Thread Charlie Clark

On 2005-11-22 at 12:27:42 [+0100], [EMAIL PROTECTED] wrote:
 
 Though the insert is failing, a sequence column in the target table is
 apparently being incremented by the failing insert.  (I deduce this
 from the fact that subsequent Z SQL test inserts show sequence gap
 of 12 after each failed insert attempt, while no gap occurs when I
 call the Z SQL method repeatedly via Zope's test tab.)
 
 I will appreciate any suggestions as to how I might troubleshoot this.

You should probably compile psycopg to give debug information and I would 
suggest updating to the most recent build in the 1 series. In addition you 
might want to try using our mxODBCZopeDA to see if the error is with the 
DA/driver or in Zope itself.

Charlie
-- 
Charlie Clark
eGenix.com

Professional Python Services directly from the Source
  Python/Zope Consulting and Support ...http://www.egenix.com/
  mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
  mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/

2005-10-17: Released mxODBC.Zope.DA 1.0.9http://zope.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! 
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db