Search Postgresql Archives

Re: Finding last checkpoint time

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

 



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@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