From: mal at lemburg.com (M.-A. Lemburg)
Date: Wed, 14 Apr 1999 10:32:55 +0200
Subject: bug in PyGreSQL module
References: <14099.24295.229214.504295@bitdiddle.cnri.reston.va.us>
Message-ID: <371452B7.1C5E40EC@lemburg.com>
Content-Length: 1056
X-UID: 1284                                                  

Jeremy Hylton wrote:
> 
> I found an apparent bug in the Python interface to PostgreSQL.  I
> tried sending a query to the author but haven't heard back, so I'm
> looking for other users to see if they have run into the problem.
> I have a table with lots of int fields, some of which of NULL.  When I
> do a Python query, the PyGreSQL module converts the NULL to 0 instead
> of None, which is the value I expected.  Is that a reasonable
> expectation?
> 
> The PyGreSQL module doesn't implement the DB API, but I checked there
> anyway.  Alas, it didn't say anything about how to handle NULL.

Database interface modules should use None as reprensentation
of SQL NULL values on the Python side of things; in fact most
interfaces already take this intuitive approach.

-- 
Marc-Andre Lemburg                               Y2000: 261 days left
---------------------------------------------------------------------
          : Python Pages >>> http://starship.skyport.net/~lemburg/  :
           ---------------------------------------------------------





