BUG #4454: LC_MESSAGES and LC_NUMERIC not working on Windows - Mailing list pgsql-bugs

From Rainer Bauer
Subject BUG #4454: LC_MESSAGES and LC_NUMERIC not working on Windows
Date
Msg-id 200810071537.m97Fb65K092670@wwwmaster.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4454
Logged by:          Rainer Bauer
Email address:      usenet@munnin.com
PostgreSQL version: 8.3.4
Operating system:   WinXPSP3
Description:        LC_MESSAGES and LC_NUMERIC not working on Windows
Details:

Hello,

This is an _ENGLISH_ Windows XPSP3 installation where the "Regional and
Language Options" have been set to "German (Germany)". The cluster was
initialized with locale "German_Germany".

The first problem is that I cannot change the messages returned from the
backend to English. Setting LC_MESSAGES has no effect. Renaming the
"~\share\locale\de" folder in the program installation was suggested here
<http://archives.postgresql.org/pgsql-general/2008-09/msg00805.php>. It
works, but this does not solve the problem that I consider to be a bug.

The next problem I am facing is that float data sent to the backend is not
accepted, because the comma separator is used in the program and the backend
expects a point separator.

I have read <http://www.postgresql.org/docs/8.3/static/locale.html> and
<http://www.postgresql.org/docs/8.3/static/functions-formatting.html>. But
setting LC_NUMERIC has no effect: it always returns "1.3" instead of "1,3"
(see ouput from a psql console below).

So either I am doing something completely wrong or this is a bug.

Regards,

Rainer


Welcome to psql 8.3.4, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

Warning: Console code page (850) differs from Windows code page (1252)
         8-bit characters might not work correctly. See psql reference
         page "Notes for Windows users" for details.

postgres=# select version();
                       version
-----------------------------------------------------
 PostgreSQL 8.3.4, compiled by Visual C++ build 1400
(1 row)

postgres=#   SHOW LC_MESSAGES;
  lc_messages
----------------
 German_Germany
(1 row)

postgres=#   SHOW LC_MONETARY;
  lc_monetary
----------------
 German_Germany
(1 row)

postgres=#   SHOW LC_TIME;
    lc_time
----------------
 German_Germany
(1 row)

postgres=#   SHOW LC_NUMERIC;
   lc_numeric
----------------
 German_Germany
(1 row)

postgres=#   select 1.3::float;
 float8
--------
    1.3
(1 row)

postgres=#   SET LC_NUMERIC TO ''; select 1.3::float;
SET
 float8
--------
    1.3
(1 row)

postgres=#   SET LC_NUMERIC TO 'C'; select 1.3::float;
SET
 float8
--------
    1.3
(1 row)

postgres=#   SET LC_NUMERIC TO 'German_Germany'; select 1.3::float;
SET
 float8
--------
    1.3
(1 row)

postgres=#   SET LC_NUMERIC TO 'German_Germany.1252'; select 1.3::float;
SET
 float8
--------
    1.3
(1 row)

postgres=#

pgsql-bugs by date:

Previous
From: Jeff Davis
Date:
Subject: Re: index bloat in 8.4-dev
Next
From: Jeff Davis
Date:
Subject: Re: index bloat in 8.4-dev