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

Re: [BUGS] BUG #4186: set lc_messages does not work

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Thomas H(dot)" <me(at)alternize(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>, Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, Gevik Babakhani <pgdev(at)xs4all(dot)nl>, Dave Page <dpage(at)pgadmin(dot)org>
Subject: Re: [BUGS] BUG #4186: set lc_messages does not work
Date: 2009-01-19 14:39:30
Message-ID: 497490A2.8070001@hagander.net (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
Hiroshi Inoue wrote:
> Hiroshi Inoue wrote:
>> Magnus Hagander wrote:
>>>
>>> Do you want to send an updated patch for it, or do you want me to look
>>> at it?
>>
>> I would send a new patch to which I added a simple ISO style check for
>>  locale names.
> 
> Attached is a new patch.
> I added a simple ISO style locale name check.
> Avoided codings like *NULL == somthing*.
> It also includes the changes to mbutils.c and elog.c which fix
> recently introduced bug by the domain name change from "postgres"
> to "postgres-8.4".

Attached is a further updated version of this patch. Changes include:

* Actually avoid NULL==something style coding everywhere (I think)
* Avoid coding like "if (ret = putenvFunc(envval), 0 != ret)"
* Per discussion, remove pg_locale.c specific coding, put it in
src/port, and do a redefine so we *always* use these new functions
* Some further minor cleanups
* Removed the change to mbutils.c and elog.c - those are a separate
issue, will deal with those as a separate patch.

There still needs to be some error checking added in IsoLocaleName(),
but this is a start.

Can someone please test this? :-) I can't get NLS to work at all in my
Windows install (this is nothing new, it's always been tricky) right
now. I'll work on trying to fix that, but help with testing would be
very useful meanwhile.

(It passes build on MSVC, it's just runtime i can't check)

//Magnus


Attachment: win_lc_messages.patch
Description: text/x-diff (8.0 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2009-01-19 14:43:29
Subject: Re: Review: B-Tree emulation for GIN
Previous:From: Simon RiggsDate: 2009-01-19 14:37:02
Subject: Re: Hot Standby dev build (v8)

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2009-01-19 23:15:48
Subject: Re: BUG #4621: Password is shown on the terminal
Previous:From: Simon KeenDate: 2009-01-19 09:08:45
Subject: Re: BUG #4620: Unexpected(doc'd) side effects of using serial and rules

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