On Fri, Sep 25, 2015 at 10:25 AM, Jim Nasby <jim.na...@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 -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers