Re: Decimal64 and Decimal128 - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Decimal64 and Decimal128
Date
Msg-id CAEepm=12aUPxfjvtPfLnX7=aJGXZVzRwbsAYfO-KJiujU5QvvQ@mail.gmail.com
Whole thread Raw
In response to Re: Decimal64 and Decimal128  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
On Fri, Sep 25, 2015 at 10:25 AM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> On 9/24/15 3:35 PM, Peter Geoghegan wrote:
>>
>> I would worry about the implicit casts you've added. They might cause
>> problems.
>
>
> Given the cycle created between numeric->decimal and decimal->numeric, I can
> pretty much guarantee they will. In any case, I don't think implicit casting
> from numeric->decimal is a good idea since it can overflow. I'm not sure
> that the other direction is safe either... I can't remember offhand if
> casting correctly obeys typmod or not.

FWIW it looks like DB2 promotes DECIMAL to DECFLOAT, not the other way around.


https://www-304.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.sqlref/src/tpc/db2z_promotionofdatatypes.dita

-- 
Thomas Munro
http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Rename withCheckOptions to insertedCheckClauses
Next
From: Robert Haas
Date:
Subject: Re: DBT-3 with SF=20 got failed