Hi all, while building an applycation in pygtk I noticed that psycopg2 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. I'm totally clueless. Any hints? TIA sandro *:-) import gtk import psycopg2 as ps2 DB = "host=localhost dbname=test user=test port=5432 password=xxx" conn = ps2.connect(DB) cursor = conn.cursor() cursor.executeq("SELECT DISTINCT a_float FROM numbers ") conn.commit() rows = cursor.fetchall() for row in rows: print row[0] -- Sandro Dentella *:-) e-mail: [EMAIL PROTECTED] http://www.tksql.org TkSQL Home page - My GPL work -- http://mail.python.org/mailman/listinfo/python-list