On Sat, 12 Aug 2000, Louis-David Mitterrand wrote:
> On Sat, Aug 12, 2000 at 12:15:26PM -0400, Tom Lane wrote:
> > Louis-David Mitterrand <cunctator@apartia.ch> writes:
> > > When "seller_locale" is, for instance, "de_DE", then I get theses
> > > errors:
> > > ERROR: Bad float8 input format '0.05'
> > > Is Postgres expecting the float as 0,05 (notice the comma) because of
> > > the locale?
The postgreSQL allows to work with locale-numbers. See to_char()
and to_number() functions.
test=# select to_char(1234.456, '9G999D999');
to_char
------------
1 234,456
(1 row)
test=# select to_number('1 234,457', '9G999D999');
to_number
-----------
1234.457
(1 row)
And your backend will out of next Tom's note :-)
> > IMPORTANT: changing the backend's locale on-the-fly is an EXTREMELY
> > DANGEROUS thing to do, and I strongly recommend that you find another
> > way to solve your problem.
Karel