From: | "Thomas H(dot)" <me(at)alternize(dot)com> |
---|---|
To: | Euler Taveira de Oliveira <euler(at)timbira(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #4186: set lc_messages does not work |
Date: | 2008-05-23 09:51:52 |
Message-ID: | 483693B8.5040402@alternize.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Euler Taveira de Oliveira wrote:
>> please observe the (previously already submitted) test queries. i've
>> removed the date/time testqueries to no further distract from the
>> problem. the bogus query "select x;" always results in a german error
>> messages no matter what LC_MESSAGES is set:
>>
> OK, that's another problem. AFAIK, that's a known problem because
> Windows doesn't have LC_MESSAGES. The above comment (pg_locale.c)
> suggests that there is no verification for the locale that is been set.
> A possible solution is to use IsValidLocaleName() [1] or
> LocaleNameToLCID() [2] but it seems that they're only available for
> Vista. :( Maybe we could emulate one of these functions with a mapping
> table [3]. [searching ...] It seems there are problems with LCIDs; they
> don't describe the locales acurately. pgwin hackers?
how does LC_MESSAGES differ from for example LC_TIME? in LC_TIME, the
checking of the specified locale seems to work:
endor=# set LC_MESSAGES = 'en-US';
SET
endor=# select x;
FEHLER: Spalte »x« existiert nicht
ZEILE 1: select x;
^
endor=# set LC_TIME = 'en-US';
FEHLER: ungültiger Wert für Parameter »lc_time«: »en-US«
endor=# set LC_TIME = 'en';
FEHLER: ungültiger Wert für Parameter »lc_time«: »en«
endor=# set LC_TIME = 'English';
SET
maybe one could as a workaround just use the lc_time locale checks for
lc_messages on windows systems? or at least match against the internal
pgsql supported translations. i don't mind having to specify "en"
instead of "English" if that gets me english error messages ;)
> Could you try to use one of the locale names described in [4]?
i take it you meant link [3]. i've tried 'en-US' and others, same
problem, errors in german (excerpt above).
> [1] http://msdn.microsoft.com/en-us/library/ms776379(VS.85).aspx
> [2] http://msdn.microsoft.com/en-us/library/ms776388(VS.85).aspx
> [3] http://msdn.microsoft.com/en-us/library/ms776260.aspx
>
regards,
thomas
From | Date | Subject | |
---|---|---|---|
Next Message | Murali Doss | 2008-05-23 11:05:17 | BUG #4188: Array field column (varchar[]) cannot be cast to type "text" |
Previous Message | Martin Sullivan | 2008-05-23 08:30:37 | BUG #4187: function to_tsvector not immutable |
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2008-05-23 10:20:45 | Re: How embarrassing: optimization of a one-shot query doesn't work |
Previous Message | Pierre-Yves Strub | 2008-05-23 09:25:22 | Re: Fragments in tsearch2 headline |