Re: Finding last checkpoint time
| От | Bruce Momjian |
|---|---|
| Тема | Re: Finding last checkpoint time |
| Дата | |
| Msg-id | 201008101520.o7AFKrd11034@momjian.us обсуждение исходный текст |
| Ответ на | Re: Finding last checkpoint time ("Greg Sabino Mullane" <greg@turnstep.com>) |
| Ответы |
Re: Finding last checkpoint time
|
| Список | pgsql-general |
Greg Sabino Mullane wrote:
[ There is text before PGP section. ]
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
>
> > Hmm, wouldn't have it been easier to set LC_MESSAGES to C before
> > calling pg_controldata?
>
> To be honest, I can't remember why that wasn't working for me when
> I tried it some time ago. I just verified that it *will* work,
> however, when I set LANGUAGE (LC_MESSAGES has no effect).
>
> Specifically, LANGUAGE changes the headers of pg_controldata
> (but not the actual output, LC_ALL does that). Thanks for the
> nudge, I'll get to rewriting some code.
pg_upgrade does this in controldata.c for this exact reason:
/*
* Because we test the pg_resetxlog output strings, it has to be in
* English.
*/
if (getenv("LANG"))
lang = pg_strdup(ctx, getenv("LANG"));
#ifndef WIN32
putenv(pg_strdup(ctx, "LANG=C"));
#else
SetEnvironmentVariableA("LANG", "C");
#endif
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
В списке pgsql-general по дате отправления: