Re: [HACKERS] The Accountant is not Amused

From: Michael Robinson <robinson(at)netrinsics(dot)com>
To: pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] The Accountant is not Amused
Date: 1999-12-05 17:53:29
Message-ID: 199912051753.BAA02628@netrinsics.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Aaron J. Seigo" <aaron(at)gtv(dot)ca> writes:
>still some quirks with numeric: no money->numeric (surprise), int2 doesn't play
>well with numeric (but converts easily to int4 which does)...

Do you pay taxes?

================
template1=> select 9.99::numeric(9,2) * 0.1;
ERROR: Unable to identify an operator '*' for types 'numeric' and 'float8'
You will have to retype this query using an explicit cast
template1=> select 9.99::numeric(9,2) * 0.1::float4;
ERROR: Unable to identify an operator '*' for types 'numeric' and 'float4'
You will have to retype this query using an explicit cast
================

I need a type that exhibits correct financial rounding behavior in tax
computations and currency conversions. My understanding is that in the
U.S., you are supposed to compute to the mil, and then round. In China
(my jurisdiction of concern), you just round to the nearest fen.

-Michael Robinson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1999-12-05 22:28:33 Re: [HACKERS] Re: Geometric Data Type in PostgreSQL
Previous Message Tom Lane 1999-12-05 17:17:54 Re: [HACKERS] The Accountant is not Amused