pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Radhika Sambamurti <radhika@88thstreet.com>
To: pgsql-sql@postgresql.org
Subject: Floating point type to store numbers
Date: Tue, 17 Apr 2007 14:53:54 -0400 (EDT)
Message-ID: <4838.63.118.86.10.1176836034.squirrel@www.88thstreet.com> (raw)

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
---




view thread (10+ messages)  latest in thread

Message-ID: <4838.63.118.86.10.1176836034.squirrel@www.88thstreet.com>
Permalink:  ../4838.63.118.86.10.1176836034.squirrel@www.88thstreet.com/
Also on:    postgresql.org/message-id/4838.63.118.86.10.1176836034.squirrel@www.88thstreet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: radhika@88thstreet.com
  Subject: Re: Floating point type to store numbers
  In-Reply-To: <4838.63.118.86.10.1176836034.squirrel@www.88thstreet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox