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

From Radhika Sambamurti
Subject Floating point type to store numbers
Date
Msg-id 4838.63.118.86.10.1176836034.squirrel@www.88thstreet.com
Whole thread Raw
Responses Re: Floating point type to store numbers  (Andrew Sullivan <ajs@crankycanuck.ca>)
Re: Floating point type to store numbers  ("Milen A. Radev" <milen@radev.net>)
Re: Floating point type to store numbers  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-sql
Hi,
I am currently using Postgresql to maintain an application which is used
for trading and back office operations. Currently our monetary fields are
stored in Varchar. I am finding a huge CPU utilization while converting
from varchar to float. I think for reasons unknown to me, we originally
stored $ amounts and rates in varchar. I am planning to convert our tables
that hold money fields and rates from varchar to float. I do not want to
convert to numeric because numeric is a special string type.

The question is: how accurate is floating point numbers in Postgres. We
are using 7.4 soon to be moving to 8.2.
I need the accuracy to about 6 decimal points. I have read that floating
points can convert to numbers in accurately.

Thank you.
Radhika


-- 
It is all a matter of perspective. You choose your view by choosing where
to stand.
Larry Wall
---



pgsql-sql by date:

Previous
From: Tommy Gildseth
Date:
Subject: Re: quesion on functions calling from php
Next
From: Andrew Sullivan
Date:
Subject: Re: Floating point type to store numbers