From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Greg Sabino Mullane <greg(at)turnstep(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Finding last checkpoint time |
Date: | 2010-08-10 15:20:53 |
Message-ID: | 201008101520.o7AFKrd11034@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2010-08-10 16:28:35 | Re: RETURN QUERY SELECT & TYPE |
Previous Message | rsmogura | 2010-08-10 14:53:02 | Numeric2 - help with library |