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

From Andrew Dunstan
Subject Re: Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name
Date
Msg-id 4DAE521C.1050405@dunslane.net
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>)
Responses Re: Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name
List pgsql-hackers

On 04/19/2011 09:42 PM, Hiroshi Inoue wrote:
>
> bootstrap_template1() in initdb runs the BKI script in bootstrap
> mode to create template1. Some symbols (LC_COLLATE, LC_CTYPE in
> pg_database etc) in the BKI script are substituted by actual values
> using replace_token(). Isn't it correct?
> ISTM replace_token() takes care of nothing about single quotes
> in its input values but the comment in scanstr() says
>                         /*
>                          * Note: if scanner is working right, unescaped
> quotes can only
>                          * appear in pairs, so there should be another
> character.
>                          */
>

That's perfectly true, but only one of the replaced locale names
contains a single quote mark. So clearly there's more going on here than
just the bug you're referring to. Heikki's commit message specifically
refers to dots in locale names, which shouldn't cause a problem of that
type, I believe.

cheers

andrew

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: time-delayed standbys
Next
From: Hiroshi Inoue
Date:
Subject: Re: Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name