Re: Money casting too liberal? - Mailing list pgsql-general

From D'Arcy J.M. Cain
Subject Re: Money casting too liberal?
Date
Msg-id 20130330095254.427c25ab@imp
Whole thread Raw
In response to Re: Money casting too liberal?  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Money casting too liberal?
List pgsql-general
On Fri, 29 Mar 2013 17:23:50 -0700
Jeff Davis <pgsql@j-davis.com> wrote:
> Why not have various rounding functions that do exactly what you want?
> Then you can use them anywhere you want in an expression.

Perhaps but the languages that we use all have the capability to manage
this and we will probably never cover all the bases in PG.

> Tying a bunch of magic to the column, I/O function, or type system
> just seems like the wrong approach when it comes to real differences
> (like precision).

That's why I suggested that operations between money(2) and money(3)
should raise an error.  Treat them as distinct types.

--
D'Arcy J.M. Cain <darcy@druid.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@Vex.Net, VOIP: sip:darcy@Vex.Net


pgsql-general by date:

Previous
From: "D'Arcy J.M. Cain"
Date:
Subject: Re: Money casting too liberal?
Next
From: "D'Arcy J.M. Cain"
Date:
Subject: Re: Money casting too liberal?