Skip site navigation (1) Skip section navigation (2)

Python interface and Money?

From: Joel Mc Graw <jmcgraw(at)databill(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Python interface and Money?
Date: 2001-10-22 17:45:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
I have a table that has a column of type money.  A query such as "select
sum(document_amount) from foo" returns the correct result when executed
from psql, yet the same query returns the wrong answer (it appears to be
a rounding issue--something like "1234.9999999999...") when executed
through PygreSQL.  Is there a workaround or a fix?

While browsing the mailing list for an answer to this problem I found
several references to the money type being deprecated.  Is that the

This is PostgreSQL 7.1.3 on FreeBSD 4.2




pgsql-interfaces by date

Next:From: Michael MeskesDate: 2001-10-23 06:56:49
Subject: Re: ECPG - connection name in "EXEC SQL AT ... " statement
Previous:From: Antonio Sergio de Mello e SouzaDate: 2001-10-22 14:44:19
Subject: ECPG error message

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group