Skip site navigation (1) Skip section navigation (2)

Re: BUG #4186: set lc_messages does not work

From: "Thomas H(dot)" <me(at)alternize(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4186: set lc_messages does not work
Date: 2008-05-29 00:50:50
Message-ID: 483DFDEA.20403@alternize.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> "Thomas H." <me(at)alternize(dot)com> writes:
>> nevertheless the problem/bug exists: changing LC_MESSAGES has no effect 
>> on the windows boxes, while it works on the non-win32 systems. all i 
>> really would like is to get english system messages back on our 
>> non-english win32 servers - like they were pre 8.3.1.
> 
> So far as I can tell, the backend's handling of LC_MESSAGES hasn't
> changed at all between 8.1.2 and 8.3.1, so if it used to work for you
> then there's been some other relevant change.  Any idea what?

well... i'm not saying it worked in earlier versions. but prior to 8.3.1 
(i've tested 8.3.0 and 8.2.3), the error messages were in english no 
matter what the config file or the os locale says.

now, with 8.3.1, error & system messages are always in the os' locale, 
and thus the bugreport. there is currently no way to set the pg system 
messages' language, as the LC_MESSAGES setting seems to be defunct on 
win32 systems.

as a small "proof", i installed the win32 8.3.0 from postgresql.org as a 
fresh install and changed the postgresl.conf' lc_messages value to 
'English_UnitedStates'. here's the psql output:

8.3.0:
-----------------------------------
postgres=# show lc_messages;
     lc_messages
--------------------
  English_UnitedStates
(1 row)

postgres=# select x;
ERROR:  column "x" does not exist
LINE 1: select x;
                ^
postgres=# set lc_messages='French';
SET
postgres=# select x;
ERROR:  column "x" does not exist
LINE 1: select x;
                ^
postgres=#
-----------------------------------

--> all system messages are in english.


after *upgrading* to 8.3.1 (again, using the official binaries), the 
output looks like this:


8.3.1:
-----------------------------------
postgres=# show lc_messages;
      lc_messages
----------------------
  English_UnitedStates
(1 Zeile)

postgres=# select x;
FEHLER:  Spalte »x« existiert nicht
ZEILE 1: select x;
                 ^
postgres=# set lc_messages='French';
SET
postgres=# select x;
FEHLER:  Spalte »x« existiert nicht
ZEILE 1: select x;
                 ^
postgres=# show lc_messages;
  lc_messages
-------------
  French
(1 Zeile)

postgres=#

-----------------------------------

--> all system messages are in german (the os' locale)

so clearly between 8.3.0 and 8.3.1, something must have changed. but the 
only patch that concerned win32 msvc/locale is the one you said wasn't 
even included...

what i noticed: if i delete the folder share/locale/de/ the system 
messages are back to english - but that can't be THE solution, can it? :)

regards,
thomas


In response to

Responses

pgsql-hackers by date

Next:From: Thomas H.Date: 2008-05-29 01:05:23
Subject: Re: BUG #4186: set lc_messages does not work
Previous:From: Jonah H. HarrisDate: 2008-05-29 00:43:05
Subject: Re: intercepting WAL writes

pgsql-bugs by date

Next:From: Thomas H.Date: 2008-05-29 01:05:23
Subject: Re: BUG #4186: set lc_messages does not work
Previous:From: Bruce MomjianDate: 2008-05-29 00:04:14
Subject: Re: BUG #4200: Regexp character classes not UTF8-compliant

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group