postgres=# SELECT to_number('123,456,789.00', '999G999G999D99') AS formatted; formatted -------------- 123456789.00 (1 row) postgres=#