[Zope-dev] Re: zPoPy oid issues

Casey Duncan cduncan@kaivo.com
Wed, 27 Dec 2000 09:16:42 -0700


Actually I found that the Postgres length function returns the string
length (i.e. number of digits) of a number, so my previous message was
wrong about the byte length of an oid. AFAIK they are 4 byte integers.

I have found a way to retrieve oids without crashing Python or Zope. You
must do an explicit type conversion to a 4 byte integer like so:

SELECT int4(oid) FROM foo;

This behaves in a much friendlier manner. I would still like to see the
problem resolved, as I find the fact that an innocuous SELECT query
could crash Zope a bit troubling.

-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>