Re: Finding last checkpoint time

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Finding last checkpoint time
Date: 2010-08-11 17:12:13
Message-ID: 201008111712.o7BHCDa23813@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Greg Sabino Mullane wrote:
> >> 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
>
> You do realize that's far from bulletproof? To be sure that that does
> anything, you'd need to set (or unset) LC_ALL and LC_MESSAGES as well.
> And I thought Windows spelled it LANGUAGE not LANG ...

Well, this has been tested on Windows in a Japanese environment. I see
test/regress/pg_regress.c does have all the settings you suggest. I
will add them too.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2010-08-11 17:12:38 Re: pg_dump and boolean format
Previous Message Scott Frankel 2010-08-11 17:00:29 pg_dump and boolean format