python 2.4 on WinXP: precisision lost with float values
Christoph Becker <[email protected]> Tue, 01 Feb 2005 12:42:21 +0100
| Newsgroups | gmane.comp.python.db.pypgsql.user |
|---|---|
| Message-ID | <[email protected]> |
I used the inoffical compiled pypgsql version for Python 2.4, made available by Gerhard Häring. In the database (PgSQL Version 8.0 as well as 7.4.3) I do have a column with type float8 and values like 2.3. This worked and still worked and still works fine on Windows with Python 2.3. With Python 2.4 however, with pypgsql, with cursor.execute() and then cursor.fetchall() for example, I got only a value of 2.0 while 2.3 is still in the database. With every value in this column I just got a zero at the right side of the decimal point. After switching back to python 2.3 everything works fine again. It seems there is a bug in the newer version of pypgsql. Regards Christoph Becker ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl