diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2009-02-12 13:26:03 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2009-02-12 13:26:03 +0000 |
commit | c1c1886d8245be78fc689dca457a11d1e18a8212 (patch) | |
tree | 13840491e181bded6f4db6064c9212df4bf0bfec /src | |
parent | eee82d44bd1e37fc859dd3c0171604feb16abc30 (diff) | |
download | postgresql-c1c1886d8245be78fc689dca457a11d1e18a8212.tar.gz postgresql-c1c1886d8245be78fc689dca457a11d1e18a8212.zip |
Unset language-related locale settings in any case, otherwise psql will
speak in tongues and mess up the regression test diffs.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/regress/pg_regress.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index 2ff76483d2e..7bd297f20c1 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -11,7 +11,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.60 2009/02/11 14:03:42 petere Exp $ + * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.61 2009/02/12 13:26:03 petere Exp $ * *------------------------------------------------------------------------- */ @@ -694,12 +694,9 @@ initialize_environment(void) unsetenv("LC_COLLATE"); unsetenv("LC_CTYPE"); unsetenv("LC_MONETARY"); - unsetenv("LC_MESSAGES"); unsetenv("LC_NUMERIC"); unsetenv("LC_TIME"); - unsetenv("LC_ALL"); unsetenv("LANG"); - unsetenv("LANGUAGE"); /* On Windows the default locale cannot be English, so force it */ #if defined(WIN32) || defined(__CYGWIN__) putenv("LANG=en"); @@ -707,6 +704,16 @@ initialize_environment(void) } /* + * Set translation-related settings to English; otherwise psql + * will produce translated messages and produce diffs. (XXX If we + * ever support translation of pg_regress, this needs to be moved + * elsewhere, where psql is actually called.) + */ + unsetenv("LANGUAGE"); + unsetenv("LC_ALL"); + putenv("LC_MESSAGES=C"); + + /* * Set multibyte as requested */ if (encoding) |