Re: Floating point type to store numbers - Mailing list pgsql-sql

From Milen A. Radev
Subject Re: Floating point type to store numbers
Date
Msg-id f03gj7$ag7$1@sea.gmane.org
Whole thread Raw
In response to Re: Floating point type to store numbers  ("Radhika Sambamurti" <radhika@88thstreet.com>)
List pgsql-sql
Radhika Sambamurti написа:
>> I believe the manual is quite clear on that one (
>> http://www.postgresql.org/docs/current/static/datatype-numeric.html#DATATYPE-FLOAT)
>> :
>>
>> " - If you require exact storage and calculations (such as for monetary
>> amounts), use the numeric type instead."
>>
>>
>> So if you decide to use floats after this warning you are on your own.
> 
> Well, actually the manual is not quite clear on this one.


Given your requirements - "an application which is used for trading and
back office operations." and "our monetary fields...", I still believe
the manual is crystal clear.

> It says quite clearly that very very small values approaching zero and
> very very large values will be problematic. But I am not calculating the
> distance to the moon. I need values to be accurate upto the 6th decimal
> place, and was wondering if people use floating point types for this sort
> of thing.


-- 
Milen A. Radev



pgsql-sql by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Floating point type to store numbers
Next
From: "Stuart McGraw"
Date:
Subject: equiv of ascii() function for unicode?