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  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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

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

Reply via email to