From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com> |
Cc: | "btober(at)computer(dot)org" <btober(at)broadstripe(dot)net>, "Raymond O'Donnell" <rod(at)iol(dot)ie>, Thomas Kellerer <spam_eater(at)gmx(dot)net>, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: About the MONEY type |
Date: | 2016-11-30 20:27:09 |
Message-ID: | CAHyXU0yaVu--7=UQaRG+vhTRdb884X4j5JQ7C2NBjmdvy1MXjg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Nov 30, 2016 at 2:16 PM, John McKown
<john(dot)archie(dot)mckown(at)gmail(dot)com> wrote:
> On Wed, Nov 30, 2016 at 1:23 PM, btober(at)computer(dot)org
> <btober(at)broadstripe(dot)net> wrote:
> Speaking generically, I guess maybe MONEY needs to be somewhat like a
> TIMESTAMP. At least in PostgreSQL, a TIMESTAMP can contain a TIMEZONE. I
> guess a MONEY type should contain a modifier identifying the issuer of the
> currency (E.g. U.S. Dollar vs Canadian Dollar vs. Yen vs. Yuan vs. "precious
> metal").
ISTM we already have that functionality; composite types. Had the
money type been written after we got composite types it might have
been done differently (or perhaps not at all). A similar observation
can be made against the geometric types.
Proper currency conversion of course is a complex topic; it'd be an
interesting thought experiment to imagine that functionality inside of
a type implementation.
The problem with the money type is that it simultaneously somehow does
too much and not enough. It kind of lives in twilight as a sneaky
fixed point integer implemented in binary. It's a scar from the heady
days of youth used to impress people :-).
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2016-11-30 21:35:12 | Re: About the MONEY type |
Previous Message | John McKown | 2016-11-30 20:16:30 | Re: About the MONEY type |