Added to TODO:
|Fix to_number() handling for values not matching the format string
---
Jeevan Chalke wrote:
> Hi,
>
> On Mon, Sep 21, 2009 at 12:36 PM, Brendan Jurd wrote:
>
> > 2009/9/21 Jeevan Chalke :
> > >
"Joshua D. Drake" wrote:
> On Wed, 2009-09-30 at 19:08 -0500, Kevin Grittner wrote:
>> I don't currently have access to an Oracle database
> Just download developer edition?
[quick google search]
Looks like that would do it. Thanks.
-Kevin
--
Sent via pgsql-hackers mailing list (pgsq
On Wed, 2009-09-30 at 19:08 -0500, Kevin Grittner wrote:
> Tom Lane wrote:
> > "Kevin Grittner" writes:
> >> daveg wrote:
> >>> On Tue, Sep 22, 2009 at 10:27:19AM +0530, Jeevan Chalke wrote:
> It seems that Oracle reads formatting string from right-to-left.
> >
> >>> It seems worse to to
Tom Lane wrote:
> "Kevin Grittner" writes:
>> daveg wrote:
>>> On Tue, Sep 22, 2009 at 10:27:19AM +0530, Jeevan Chalke wrote:
It seems that Oracle reads formatting string from right-to-left.
>
>>> It seems worse to to give a wrong answer silently then to throw an
>>> error. What we do n
"Kevin Grittner" writes:
> daveg wrote:
>> On Tue, Sep 22, 2009 at 10:27:19AM +0530, Jeevan Chalke wrote:
>>> It seems that Oracle reads formatting string from right-to-left.
>> It seems worse to to give a wrong answer silently then to throw an
>> error. What we do now seems sort of MySqlish.
daveg wrote:
> 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') ==> 3
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') ==> 3450340
> ('
Jeevan Chalke escreveu:
> That means we cannot simply ignore such characters from the input.
> Rather we can process the string R-L. But yes this will definitely going
> to break the current applications running today.
>
IIRC we tight the to_char() and to_timestamp() input for 8.4. Why don't we do
Hi,
On Mon, Sep 21, 2009 at 12:36 PM, Brendan Jurd wrote:
> 2009/9/21 Jeevan Chalke :
> > Oracle returns "19-SEP-09" irrespective of the format.
> > Here in PG, we have getting the proper date irrespective of the format as
> > Oracle. But in the case to to_number the returned value is wrong. For
2009/9/21 Brendan Jurd :
>
> # SELECT regexp_replace('34,50', E'[\\d.]', '', 'g')::numeric;
> 3450
>
Sorry, that regex ought to have read E'[^\\d.]'.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgs
2009/9/21 Jeevan Chalke :
> Oracle returns "19-SEP-09" irrespective of the format.
> Here in PG, we have getting the proper date irrespective of the format as
> Oracle. But in the case to to_number the returned value is wrong. For
> example following query returns '340' on PG where as it returns '3
Hi,
On Sat, Sep 19, 2009 at 1:52 AM, Brendan Jurd wrote:
> 2009/9/19 Tom Lane :
> > Should we have it throw an error if the input corresponding to a G
> > symbol doesn't match the expected group separator? I'm concerned that
> > that would break applications that work okay today.
> >
>
> It wou
2009/9/19 Tom Lane :
> Should we have it throw an error if the input corresponding to a G
> symbol doesn't match the expected group separator? I'm concerned that
> that would break applications that work okay today.
>
It would be a substantial change to the behaviour, and to do it
properly we'd h
Jeevan Chalke writes:
> With PG84, I have tried something like this which seem incorrect to me.
> # SELECT '' AS to_number_2, to_number('-347,58', '99G999');
Well, the input doesn't actually match the format, so I'm not totally
excited about this. You do get sane results from:
regression=# se
Hi,
With PG84, I have tried something like this which seem incorrect to me.
# SELECT '' AS to_number_2, to_number('-347,58', '99G999');
to_number_2 | to_number
-+---
| -3458
(1 row)
After browsing the code (numeric_to_number), I have found that number strin
15 matches
Mail list logo