Re: Application user name attribute on connection pool

From: "Peter C(dot) Lai" <peter(at)simons-rock(dot)edu>
To: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
Cc: Radosław Smogura <rsmogura(at)softperience(dot)eu>, John R Pierce <pierce(at)hogranch(dot)com>, rsmogura(at)softperience(dot)pl, pgsql-general(at)postgresql(dot)org
Subject: Re: Application user name attribute on connection pool
Date: 2010-08-03 15:30:25
Message-ID: 20100803153024.GU35187@cesium.hyperfine.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)postgresql(dot)org)
> 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
===========================================================

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2010-08-03 15:33:26 Re: deleting db cluster
Previous Message Santiago Álvarez Martínez 2010-08-03 15:18:09 "package org.postgresql.util does not exist" compilation problem