Re: Problem with pg_dump and decimal mark - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Problem with pg_dump and decimal mark
Date
Msg-id 5478EBE3.2010106@aklaver.com
Whole thread Raw
In response to Problem with pg_dump and decimal mark  (Eric Svenson <esvenson74@googlemail.com>)
Responses Re: Problem with pg_dump and decimal mark  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On 11/28/2014 05:35 AM, Eric Svenson wrote:
> Hello,
>
> I have done a backup of a postgres database on a virtual machine
> (Windows 8.1) using pg_dump.
>
> On another (non-virtual) machine the restore (with psql) worked without
> problems.
>
> On the third virtual machine, however, the restore fails.
>
> (ERROR: invalid input syntax for type double precision: 0.100000000001)
>
> When I change the value in the sql file manually to 0,100000000001 the
> and try again, the restore resumes until the next double value.
>
> How is this possible? Does psql really expect comma-seperated decimal
> values in the sql file? How can I change this behaviour?

Seems you have a locale mismatch issue. The dump is coming from a locale
where a '.' is the decimal mark and is being restored to a locale where
',' is the mark. Look at what the locales are the machines that work and
the one that does not.

>
> Regards,
> Eric Svenson
>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Eric Svenson
Date:
Subject: Problem with pg_dump and decimal mark
Next
From: Tom Lane
Date:
Subject: Re: Problem with pg_dump and decimal mark