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

From Adrian Klaver
Subject Re: Fwd: Problem with pg_dump and decimal mark
Date
Msg-id 547F2B1F.9090206@aklaver.com
Whole thread Raw
In response to Fwd: Problem with pg_dump and decimal mark  (Eric Svenson <esvenson74@googlemail.com>)
List pgsql-general
On 12/03/2014 12:23 AM, Eric Svenson wrote:
>
> Hi Adrian,
>
> thank you for your support. Here are the informations you requested
>
>
>     I have already done that and found something strange:
>
>     On the PC where the backup was done with pg_dump, all locale settings of
>     Postgres were English/United States. (LC_COLLATE, LC_CTYPE, LC_MONETARY,
>     LC_NUMERIC in postgresql.conf)
>
>
>  > OS and OS version?
>
> Windows Server 2012R2
>
>  > Postgres version?
>
> Version 9.2.1 (same version used on all machines)
>
>  > What was the pg_dump command used?
>
> pg_dump -p 6789 -EUTF8 -f myFile.sql my_Database
>

>  > How was it loaded via psql?
>
> psql -p 6789 -U postgres my_Database < myFile.sql
>
>  > Was the psql on the same machine and from the same version of Postgres?
>
> Same version, but on different machines.
>
>
>     On the second PC (Virtual Machine) I had the SAME settings in
>     postgresql.conf (German_Germany)
>
>
>  > OS and OS version?
>
> Windows 7 Ultimate SP 1
>
>  > Postgres version?
>
> Version 9.2.1 (same version used on all machines)
>
>  > How was it loaded via psql?
>
> psql -p 6789 -U postgres my_Database < myFile.sql
>
>  > Did you use the psql on the VM or did you use the psql on the host?
>
> psql on the VM
>

So what if you load to the VM Postgres using the psql from the host?

>
> Again, thank you for the support.

As Tom said LC_NUMERIC is set to C in main.c:

/*
          * We keep these set to "C" always, except transiently in
pg_locale.c; see
          * that file for explanations.
          */

The transiently part intrigued me so I went to pg_locale.c and there was
a big:

* !!! NOW HEAR THIS !!!

with regards to resetting locales. Honestly the explanation is beyond my
expertise. I offer it only as a starting point for those that can
understand it.


>
> Regards,
> Eric Svenson


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: FW: getting error while running sql on mm_activealrm table
Next
From: Tim Schäfer
Date:
Subject: Re: Auto vacuum not running -- Could not bind socket for statistics collector