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

From Michael Robinson
Subject Re: [HACKERS] The Accountant is not Amused
Date
Msg-id 199912051753.BAA02628@netrinsics.com
Whole thread Raw
In response to Re: [HACKERS] The Accountant is not Amused  ("Aaron J. Seigo" <aaron@gtv.ca>)
List pgsql-hackers
"Aaron J. Seigo" <aaron@gtv.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
usingan 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
usingan 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] The Accountant is not Amused
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] Re: Geometric Data Type in PostgreSQL