Re: numeric_to_number() function skipping some digits - Mailing list pgsql-hackers

From daveg
Subject Re: numeric_to_number() function skipping some digits
Date
Msg-id 20090923081311.GE27248@sonic.net
Whole thread Raw
In response to Re: numeric_to_number() function skipping some digits  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Responses Re: numeric_to_number() function skipping some digits
List pgsql-hackers
On Tue, Sep 22, 2009 at 10:27:19AM +0530, Jeevan Chalke wrote:
> 
> It seems that Oracle reads formatting string from right-to-left. Here are
> few results:
> ('number','format') ==> Oracle          PG
> --------------------------------------------
> ('34,50','999,99')  ==> 3450            340
> ('34,50','99,99')   ==> 3450            3450
> ('34,50','99,999')  ==> Invalid Number  3450
> ('34,50','999,999') ==> Invalid Number  340

It seems worse to to give a wrong answer silently then to throw an error.
What we do now seems sort of MySqlish.

-dg

-- 
David Gould       daveg@sonic.net      510 536 1443    510 282 0869
If simplicity worked, the world would be overrun with insects.


pgsql-hackers by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: Lock Wait Statistics (next commitfest)
Next
From: Heikki Linnakangas
Date:
Subject: Re: Hot Standby 0.2.1