Re: select to_number('1,000', '999,999');
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Schweikert <dws@ee.ethz.ch>
Cc: pgsql-bugs@postgresql.org
Date: 2004-11-22T01:10:08Z
Lists: pgsql-bugs
David Schweikert <dws@ee.ethz.ch> writes:
> select to_number('1,000', '999,999') returns '100'.
I'm not entirely convinced this is a bug. I get the right answer from
regression=# select to_number('001,000', '999,999') ;
to_number
-----------
1000
(1 row)
It's arguable that to_number() should throw an error when the input
doesn't match the format, but right now it doesn't ...
regards, tom lane