Skip site navigation (1) Skip section navigation (2)

Re: function to format floats as money?

From: John Hasler <john(at)dhh(dot)gt(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: function to format floats as money?
Date: 2001-04-17 18:52:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Ross writes:
> But seriously, numeric(10,2) (or whatever precision and scale is correct
> for your application) is the standard answer.

Floats are fine for money as long as you only add and subtract and don't
deal in amounts that won't fit in the mantissa.
John Hasler
john(at)dhh(dot)gt(dot)org (John Hasler)
Dancing Horse Hill
Elmwood, WI

In response to


pgsql-sql by date

Next:From: clayton cottinghamDate: 2001-04-17 19:51:16
Subject: is this proper sql?
Previous:From: clayton cottinghamDate: 2001-04-17 18:38:15
Subject: any proper benchmark scripts?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group