Search Postgresql Archives

Re: Finding last checkpoint time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Lane wrote:
> Bruce Momjian <bruce@xxxxxxxxxx> 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@xxxxxxxxxx>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux