diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-01-05 00:55:36 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-01-05 00:55:36 +0000 |
commit | 040d3e63a7eb2840e957a036209496492febd5f7 (patch) | |
tree | 0901fb43ea078d0cea4483f6568f96fc3da06adc /src/backend/access/transam/xlog.c | |
parent | 3abc36786b422136917d12dcdfa1031fef05f843 (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.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 169d5037ba0..927d723e09a 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, 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.109.2.5 2005/05/31 19:11:14 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.109.2.6 2006/01/05 00:55:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -37,6 +37,7 @@ #include "storage/sinval.h" #include "storage/spin.h" #include "utils/builtins.h" +#include "utils/pg_locale.h" #include "utils/relcache.h" #include "miscadmin.h" @@ -2283,13 +2284,13 @@ ReadControlFile(void) "\tIt looks like you need to initdb.", ControlFile->localeBuflen, LOCALE_NAME_BUFLEN); - if (setlocale(LC_COLLATE, ControlFile->lc_collate) == NULL) + if (pg_perm_setlocale(LC_COLLATE, ControlFile->lc_collate) == NULL) elog(PANIC, "The database cluster was initialized with LC_COLLATE '%s',\n" "\twhich is not recognized by setlocale().\n" "\tIt looks like you need to initdb.", ControlFile->lc_collate); - if (setlocale(LC_CTYPE, ControlFile->lc_ctype) == NULL) + if (pg_perm_setlocale(LC_CTYPE, ControlFile->lc_ctype) == NULL) elog(PANIC, "The database cluster was initialized with LC_CTYPE '%s',\n" "\twhich is not recognized by setlocale().\n" |