Re: type money causes unrestorable dump

From: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: type money causes unrestorable dump
Date: 2007-10-09 15:26:16
Message-ID: 20071009112616.2aeb164a.darcy@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 8 Oct 2007 20:02:56 -0700
"Joshua D. Drake" <jd(at)commandprompt(dot)com> wrote:
> The money data type has been deprecated for years. It is completely non
> standard and essentially duplicative of numeric/decimal. What is the
> point?

It may be deprecated (maybe not) and it may have drawbacks but it is
not a duplication of numeric or decimal. While numeric/decimal may be
faster for I/O, money is faster for doing large sums. Depending on
your needs it does have an advantage over numeric.

That said, I wonder if there is another answer to this question.
Perhaps the functions in cash.c can be pulled out and made into
external functions that can be fed an int (long) and output the desired
format. That way we could use the existing int or long type but
convert manually on I/O. Let people choose whether they want the
simplification of the money type or the standardization allowed by just
using the functions.

Just a thought.

--
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Browne 2007-10-09 15:28:08 Re: some points for FAQ
Previous Message Andrew Dunstan 2007-10-09 15:22:50 Re: Including Snapshot Info with Indexes