Re: Arbitrary precision arithmatic with pgsql

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Arbitrary precision arithmatic with pgsql
Date: 2004-08-31 14:27:11
Message-ID: D8906004-FB59-11D8-A2A0-000A95C88220@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Aug 31, 2004, at 11:18 PM, Jan Wieck wrote:

> I agree that doing
>
> select 2::numeric ^ 100;
>
> should emit some sort of a warning. Because what happens here is that
> the numeric value is degraded to a float8 in order to use the
> operator.

Would this be solved by overloading the ^ operator with the
pow(numeric,numeric) function? Would the 100 be cast INT -> NUMERIC?

Michael Glaesemann
grzm myrealbox com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2004-08-31 15:04:52 Re: Arbitrary precision arithmatic with pgsql
Previous Message Jan Wieck 2004-08-31 14:18:00 Re: Arbitrary precision arithmatic with pgsql