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: | Gavan Schneider <pg-gts(at)snkmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Money casting too liberal? |
Date: | 2013-03-29 16:32:54 |
Message-ID: | 20130329123254.37edf7d3@imp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 29 Mar 2013 11:46:40 -0400
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Well, this has been discussed before, and the majority view every
> time has been that MONEY is a legacy thing that most people would
> rather rip out than sink a large amount of additional effort into.
> It has some use-cases but they are narrow, and it's not clear how
> much wider the use-cases would be if we tried to generalize it.
I wonder if our vision isn't a little tunneled here. Using this type
for money is, perhaps, a specialized use and the type should really be
called something else and modified to remove all connotations of money
from it. So...
- Drop the currency symbol
- Allow number of decimals to be defined once for the column
- Don't use locale except to specify decimal separator (',' vs. '.')
- Allow operations against numeric
Not sure what to rename it to. Decimal would be good if it wasn't
already in use. Maybe DecimalInt.
> My own experience with this sort of thing leads me to think that
> real applications dealing with a variety of currencies will be
> needing to store additional details, such as the exact exchange
> rate that applied to a particular transaction. So while merely
Seems like something that can be stored in a different column.
--
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 788 2246 (DoD#0082) (eNTP) | what's for dinner.
IM: darcy(at)Vex(dot)Net, VOIP: sip:darcy(at)Vex(dot)Net
From | Date | Subject | |
---|---|---|---|
Next Message | Quentin Hartman | 2013-03-29 16:35:55 | Re: Streaming replication slave crash |
Previous Message | Lonni J Friedman | 2013-03-29 16:23:34 | Re: Streaming replication slave crash |