Re: Money type todos?

From: August Zajonc <augustz(at)augustz(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Money type todos?
Date: 2007-03-21 15:43:16
Message-ID: 46015294.1090608@augustz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan wrote:
> August Zajonc wrote:
>> The only other nice thing would be user defined precision, but
>> can live without that as most currencies work under nnn.mm.
>
> That's useless for our system at least. The minimum scale we use for
> money values is 5. I guess we can just continue to use numeric though.
>

Emailing off list with Andrew I'm reminded of one other feature that
would be potentially valuable in a money type, and that's being able to
specify the method of rounding.

There end up being a number of different rounding methods out there, and
in some cases it is very valuable to critical to follow a certain
method, usually dictated by externalities such as trading partners etc.

This could probably be a compile time flag even for postgresql and is
obviously a low priority behind speed.

Symmetric Arithmetic Rounding
Bankers Rounding
Round-half-down

Not sure its worth doing and if so probably a low priority, just
mentioning it for completeness.

- August

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Shane Ambler 2007-03-21 15:47:32 Re: Money type todos?
Previous Message Magnus Hagander 2007-03-21 15:36:29 Re: [COMMITTERS] pgsql: Native shared memory implementation for win32.