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

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Magnus Hagander <magnus(at)hagander(dot)net>
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-20 03:52:12
Message-ID: 49754A6C.6050802@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Magnus Hagander wrote:
> 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:

Thanks.

> * 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? :-)

OK I would check it tonight.
Please note the patch relies on the proper gettext module.
The header, lib and dlls are placed on Saito-san's site
http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/libintl_check/
.
Also note the current source tries to find the message catalog
postgres-8.4.mo not postgres.mo.
The attached is an example patch to change the name of mo files
at installation time. I'm not good at perl and there may be
cleaner way.

regards,
Hiroshi Inoue

Attachment Content-Type Size
Installpm.patch text/plain 1.3 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Marshall, Steve 2009-01-20 14:02:15 Re: pg_listener entries deleted under heavy NOTIFY load only on Windows
Previous Message Bruce Momjian 2009-01-19 23:15:48 Re: BUG #4621: Password is shown on the terminal

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-01-20 04:12:30 Re: FWD: Re: Updated backslash consistency patch
Previous Message Hiroshi Inoue 2009-01-20 03:31:29 Re: Re: [COMMITTERS] pgsql: Explicitly bind gettext() to the UTF8 locale when in use.