Re: [HACKERS] The Accountant is not Amused

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Michael Robinson <robinson(at)netrinsics(dot)com>
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] The Accountant is not Amused
Date: 1999-12-05 22:56:34
Message-ID: Pine.LNX.4.20.9912051650420.349-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1999-12-05 23:18:10 Re: [HACKERS] Raising funds for PostgreSQL
Previous Message Peter Eisentraut 1999-12-05 22:56:21 postconfig/PGLIB/initdb