Re: Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name
Date
Msg-id 25219.1303306707@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name  (Hiroshi Inoue <inoue@tpf.co.jp>)
List pgsql-hackers
Hiroshi Inoue <inoue@tpf.co.jp> writes:
> I see another issue for the behavior.

> For example, the following code in src/backend/utis/adt/pg_locale.c
> won't work as expected in case the current locale is Hong Kong, Macao or
> UAE because the last setlocale() in the code would fail. I can
> find such save & restore operations of locales in several places.

Well, if Windows' setlocale is too brain-dead to accept its own output,
there's nothing to be done about it except to file a bug with Microsoft.
There isn't anything in the POSIX API that would let us avoid using
setlocale with a previous result value to restore the previous setting.
        regards, tom lane


pgsql-hackers by date:

Previous
From: rajibdk
Date:
Subject: database system identifier differs between the primary and standby
Next
From: Robert Haas
Date:
Subject: Re: database system identifier differs between the primary and standby