summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-01-05 00:54:51 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-01-05 00:54:51 +0000
commite9bb12d5ab8c5de214f6c4ca292379b71d789c90 (patch)
treed67cba8ab94ee5a791b16fc654337af0f1d2bf54 /src/backend/access/transam/xlog.c
parentf3366134388dd257e0b30cfc12417de3c7d80235 (diff)
Arrange to set the LC_XXX environment variables to match our locale setup.
Back-patch of previous fix in HEAD for plperl-vs-locale issue.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 5722540b0c2..0e14d9db99b 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.222.2.1 2005/11/22 18:23:05 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.222.2.2 2006/01/05 00:54:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,6 +45,7 @@
#include "utils/builtins.h"
#include "utils/guc.h"
#include "utils/nabstime.h"
+#include "utils/pg_locale.h"
#include "utils/relcache.h"
@@ -3619,14 +3620,14 @@ ReadControlFile(void)
" but the server was compiled with LOCALE_NAME_BUFLEN %d.",
ControlFile->localeBuflen, LOCALE_NAME_BUFLEN),
errhint("It looks like you need to recompile or initdb.")));
- if (setlocale(LC_COLLATE, ControlFile->lc_collate) == NULL)
+ if (pg_perm_setlocale(LC_COLLATE, ControlFile->lc_collate) == NULL)
ereport(FATAL,
(errmsg("database files are incompatible with operating system"),
errdetail("The database cluster was initialized with LC_COLLATE \"%s\","
" which is not recognized by setlocale().",
ControlFile->lc_collate),
errhint("It looks like you need to initdb or install locale support.")));
- if (setlocale(LC_CTYPE, ControlFile->lc_ctype) == NULL)
+ if (pg_perm_setlocale(LC_CTYPE, ControlFile->lc_ctype) == NULL)
ereport(FATAL,
(errmsg("database files are incompatible with operating system"),
errdetail("The database cluster was initialized with LC_CTYPE \"%s\","