Search Postgresql Archives

Re: Application user name attribute on connection pool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Usually bighouse financial systems use BIGINT and a field to store
position-of-decimal point to track arbitrary precision currency values...
That's the "right way" to do it. I believe for mom-and-pop stuff, you can 
satisfy the auditors if you use NUMERIC(,2) and implement round-to-even 
(banker's rounding), though...

On 2010-08-03 08:01:34AM +0200, Alban Hertroys wrote:
> On 2 Aug 2010, at 23:43, Radosław Smogura wrote:
> 
> >> PostgreSQL already has BIGINT aka INT8, which are 8 bytes, and can
> >> represent integers up to like 9 billion billion (eg, 9 * 10^18).
> > But I think about numbers with precision - you can use float for moneys, etc 
> > (rounding problems), and dividing each value in application by some scale 
> > isn't nice, too.
> 
> 
> Most people don't use float for monetary values.
> Have a look at the NUMERIC type: http://www.postgresql.org/docs/8.4/interactive/datatype-numeric.html
> 
> Alban Hertroys
> 
> --
> If you can't see the forest for the trees,
> cut the trees and you'll see there is no forest.
> 
> 
> !DSPAM:737,4c57b0dc286217280628589!
> 
> 
> 
> -- 
> Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

-- 
===========================================================
Peter C. Lai                 | Bard College at Simon's Rock
Systems Administrator        | 84 Alford Rd.
Information Technology Svcs. | Gt. Barrington, MA 01230 USA
peter AT simons-rock.edu     | (413) 528-7428
===========================================================


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux