Обсуждение: Locale query

Поиск
Список
Период
Сортировка

Locale query

От
"admin@buydirect.net.au"
Дата:
Hi,

I have a query re localization. I am running Centos 4.3 and am using a
CMS using Postgresql 8.1.18-2 (installed via yum).

The documentation for the CMS advise to ensure Postgresql is initialised
with C locale for performance reasons. To accomplish they advise:

1. in /etc/sysconfig/i18n replace LANG="en_US.UTF-8" with LANG=""
2. After installing Postgresql with:

initdb -D /var/lib/pgsql/data --locale=C

I have done the above but when I run su postgres then 'locale' I get the
following:

LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

My Postgresql.conf however has the following locale settings:

**# - Locale and Formatting -**

#datestyle = 'iso, mdy'
#timezone = unknown # actually, defaults to TZ
# environment setting
#australian_timezones = off
#extra_float_digits = 0 # min -15, max 2
#client_encoding = sql_ascii # actually, defaults to database
# encoding

# These settings are initialized by initdb -- they might be changed
lc_messages = 'C' # locale for system error message
# strings
lc_monetary = 'C' # locale for monetary formatting
lc_numeric = 'C' # locale for number formatting
lc_time = 'C' # locale for time formatting

Is everything ok with the above or something has gone wrong? I guess I
was expecting the locale command would show C instead of POSIX.

Thanks!!
Andy

Re: Locale query

От
"admin@buydirect.net.au"
Дата:
Hi,
>
> I have a query re localization. I am running Centos 4.3 and am using a
> CMS using Postgresql 8.1.18-2 (installed via yum).
>
> The documentation for the CMS advise to ensure Postgresql is
> initialised with C locale for performance reasons. To accomplish they
> advise:
>
> 1. in /etc/sysconfig/i18n replace LANG="en_US.UTF-8" with LANG=""
> 2. After installing Postgresql with:
>
> initdb -D /var/lib/pgsql/data --locale=C
>
> I have done the above but when I run su postgres then 'locale' I get
> the following:
>
> LANG=
> LC_CTYPE="POSIX"
> LC_NUMERIC="POSIX"
> LC_TIME="POSIX"
> LC_COLLATE="POSIX"
> LC_MONETARY="POSIX"
> LC_MESSAGES="POSIX"
> LC_PAPER="POSIX"
> LC_NAME="POSIX"
> LC_ADDRESS="POSIX"
> LC_TELEPHONE="POSIX"
> LC_MEASUREMENT="POSIX"
> LC_IDENTIFICATION="POSIX"
> LC_ALL=
>
> My Postgresql.conf however has the following locale settings:
>
> **# - Locale and Formatting -**
>
> #datestyle = 'iso, mdy'
> #timezone = unknown # actually, defaults to TZ
> # environment setting
> #australian_timezones = off
> #extra_float_digits = 0 # min -15, max 2
> #client_encoding = sql_ascii # actually, defaults to database
> # encoding
>
> # These settings are initialized by initdb -- they might be changed
> lc_messages = 'C' # locale for system error message
> # strings
> lc_monetary = 'C' # locale for monetary formatting
> lc_numeric = 'C' # locale for number formatting
> lc_time = 'C' # locale for time formatting
>
> Is everything ok with the above or something has gone wrong? I guess I
> was expecting the locale command would show C instead of POSIX.
>
> Thanks!!
> Andy

Re: Locale query

От
Roger Leigh
Дата:
On Sat, Nov 28, 2009 at 09:46:18PM +1100, admin@buydirect.net.au wrote:
> Is everything ok with the above or something has gone wrong? I guess I
> was expecting the locale command would show C instead of POSIX.

The "C" and "POSIX" locales are one and the same thing.


Regards,
Roger

--
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Вложения