Re: [HACKERS] The Accountant is not Amused - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] The Accountant is not Amused
Date
Msg-id Pine.LNX.4.20.9912051650420.349-100000@localhost.localdomain
Whole thread Raw
In response to The Accountant is not Amused  (Michael Robinson <robinson@netrinsics.com>)
List pgsql-hackers
On 1999-12-05, Michael Robinson mentioned:

> template1=> select 9.99::money / 10.0;
> ?column?
> --------
> $1.00   
> (1 row)

You should be using the numeric type. Money is deprecated. What you
pointed out is probably only one of its problems. However, the numeric
type seems to have some ideas of its own as well:

=> select 9.99::numeric(9,2) / 10.0::numeric(9,2);   ?column?
------------
0.9990000000
(1 row)

What are the rules governing this situation?

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: postconfig/PGLIB/initdb
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] Raising funds for PostgreSQL