[Zope-DB] Extrange behavior with numeric datatypes and decimal
Luis Mariano Luporini
lluporini at yahoo.com.ar
Mon Aug 4 15:24:14 EDT 2003
I'm having a problem using the following:
- Gentoo Linux
- Zope 2.6.1
- Python 2.1.3
- psycopg 1.1.2
- zpsycopgda 1.1.2
- Postgresql 7.3.3
The situation is I'm trying to get a number (result of a division)
rounded to two decimal places and can't get it to work.
After some research, my problem can be simplified to this:
If I run the query:
in psql I get a result of 3.00 (normal and expected behavior)
in zope I get a result of 3.0 (why just one decimal place?)
How can I get around this. Is this a bug in psycopg or something like that?
Anybody experienced this?
Thanks in advance.
More information about the Zope-DB