[PyGreSQL] Version 3.0 PyGreSQL

D'Arcy J.M. Cain darcy at druid.net
Tue Apr 18 09:16:15 EDT 2000


Thus spake Tony Lownds
> There's a few problems I have found with the functionality of pgdb:
> 
> The cursor object does not have arraysize, rowcount or description 
> attributes. The code sets these values in a private dictionary 
> instead of directly setting attibutes. Perhaps this private 
> dictionary was going to be used in __getitem__ and __setitem__ 
> methods. I think it would be fine to just set self.arraysize and the 
> other attributes directly.
> 
> The other problem is with the description attribute - it does not 
> provide the names of the columns that a query generates, it provides 
> the type name twice.

I'm afraid I will need some help here as I don't have the experience with
DB-SIG API that I need to do this.  All I ask is that yo send any patches
(context diffs please) to this list so that others can review it before
I incorporate it.

> The last problem, and I'm not sure about it, is that I am getting 
> None for values of columns that are empty strings in the database. 
> The psql utility doesn't show NULLs so its hard to demonstrate now 
> but the previous version of PyGreSQL returns '' in those columns and 
> that's how it was inserted. I don't think this problem originates in 
> pgdb.py. I am using Postgres 6.4.2 btw.

Yes, see the warning in the new Annonce file.  This is a non-backwards
compatible change to the API.  I suspect that you are seeing NULLS in
your database and not blanks.  Try a SELECT testing those columns
agains NULL and see.

> Also, there is no Makefile in the -beta.tgz tarball, and the .spec 
> file has the wrong value in the release macro.

It's kind of hard to include a Makefile when there are so many ways to
compile it.  Most cases one would use the Python Makefile anyway.  The
README points the way and is probably the best we can do.  If I included
a Makefile I would probably get even more complaints when it was done
wrong for variable definitions of "wrong."

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.




More information about the PyGreSQL mailing list