Re: numeric_to_number() function skipping some digits

From: daveg <daveg(at)sonic(dot)net>
To: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
Cc: Brendan Jurd <direvus(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: numeric_to_number() function skipping some digits
Date: 2009-09-23 08:13:12
Message-ID: 20090923081311.GE27248@sonic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sonic(dot)net 510 536 1443 510 282 0869
If simplicity worked, the world would be overrun with insects.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-09-23 08:13:45 Re: Hot Standby 0.2.1
Previous Message Mark Kirkwood 2009-09-23 06:18:51 Re: Lock Wait Statistics (next commitfest)