Jeff Davis <pg...@j-davis.com> writes: > But there are a couple problems:
> 1. I don't think it's supported on Windows. Can't help with that, but surely Windows has some thread-safe way. > 2. I don't see a good way to canonicalize a locale name, like in > check_locale(), which uses the result of setlocale(). What I can tell you about that is that check_locale's expectation that setlocale does any useful canonicalization is mostly wishful thinking [1]. On a lot of platforms you just get the input string back again. If that's the only thing keeping us on setlocale, I think we could drop it. (Perhaps we should do some canonicalization of our own instead?) regards, tom lane [1] https://www.postgresql.org/message-id/14856.1348497...@sss.pgh.pa.us