Hello Sandro,
On Wed, 2006-06-14 at 07:23, Sandro Dentella wrote:
> Sorry if this is not SA related, but I guess some of you could have already
> met this problem and some could anyhow be interested. I have an application
> in pygtk that uses sqlalchemy.  I noticed that it returns the floats rouded
> (eg: 4.123 -> 4.0).
> 
> This turns out to be a problem of psycopg2 (psycopg behaves correctly) when
> you 'import gtk' !!! It behaves correctly with numeric/decimal, though.
> 

Sorry I can't reproduce.  I'm using the 2.0.2 psycopg2 which has a
memory corruption fix I submitted last weekend.

>>> import gtk
>>> import psycopg2
>>> conn = psycopg2.connect('dbname=wkv')
>>> curs = conn.cursor()
>>> curs.execute('SELECT DISTINCT a_float FROM numbers')
>>> rows = curs.fetchall()
>>> for row in rows:
...     print row[0]
...
0.1
4.001
4.123
4.456
4.789

HTH,
William.




_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to