David Schweikert <dws(at)ee(dot)ethz(dot)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