diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-01-05 00:55:24 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-01-05 00:55:24 +0000 |
commit | d514752dbf15b0a8428e6d8a1dc6cca9b9da5684 (patch) | |
tree | 66b35409b82d60017da511ef476d8f8463429002 /src/backend/access | |
parent | 37cdf43eaa58ffc8a361cefc013917ff61c8bb3d (diff) | |
download | postgresql-d514752dbf15b0a8428e6d8a1dc6cca9b9da5684.tar.gz postgresql-d514752dbf15b0a8428e6d8a1dc6cca9b9da5684.zip |
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')
-rw-r--r-- | src/backend/access/transam/xlog.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 3d7b55712b6..5a102750750 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.125.2.3 2005/05/31 19:10:57 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.125.2.4 2006/01/05 00:55:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -35,6 +35,7 @@ #include "storage/spin.h" #include "utils/builtins.h" #include "utils/guc.h" +#include "utils/pg_locale.h" #include "utils/relcache.h" #include "miscadmin.h" @@ -2349,14 +2350,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\"," |