Re: monetary bug

From: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: m_taghi(at)yahoo(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: monetary bug
Date: 2004-08-22 21:15:11
Message-ID: 20040822171511.2bb202c8.darcy@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 22 Aug 2004 13:29:14 -0400
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Are you aware that the monetary type is deprecated and is going to be
> dropped entirely pretty soon? I would not recommend that you spend
> any time on it, unless you want to commit to doing a wholesale
> rewrite. Store your financial data in NUMERIC columns instead --- no
> overflow worries, for one thing.

And if you have a table with 30,000,000+ records and need to sum a
subset of them 100 times per second expect some stress.

FWIW I have been working on a contrib module that stores the amount in a
64 bit integer. Perhaps I should submit it as a patch to the existing
money type instead. I have fixed up a few other issues while I was at
it.

--
D'Arcy J.M. Cain <darcy(at)druid(dot)net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stěhule 2004-08-22 21:15:13 Add TODO, plpgsql exception, others, variables sqlcode and sqlerrm
Previous Message Peter Eisentraut 2004-08-22 20:34:07 Re: monetary bug