[orm-devel] Introduction, thanks and a couple of comments on the 0.7 release
Ross J. Reedstrom
Fri, 6 Dec 2002 09:38:42 -0600
On Fri, Dec 06, 2002 at 12:28:42PM +0100, Diedrich Vorberg wrote:
> As you know a float point number is not what you want to use for
> monetary arithmetic. You might want to use integers describing the
> number of cents or PostgreSQL's MONEY type. The latter, btw, comes
> back as a string from the database like this:
> but at least the SQL internal math should work.
Ack, no - the money type is depricated, and will disappear in 7.4.
The right answer is to extend psycopg to 'do the right thing'
(perhaps as a option?) with the numeric type. Your original idea
of using a python extension numeric type sounds right to me.