FAQ
Hi there,
I am trying to set the --locale for a database but receive 'invalid locale
name'

Here is the posgresql.conf part:

lc_messages = 'en_US.UTF-8' # locale for system error message
# strings
lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
lc_numeric = 'en_US.UTF-8' # locale for number formatting
lc_time = 'en_US.UTF-8' # locale for time formatting
default_text_search_config = 'pg_catalog.english'

locale -a says:

C
en_US.utf8
hu_HU.utf8
POSIX

I would like to use hu_HU.utf8:

createdb -E UTF8 --locale='hu_HU.utf8' test
Password:
createdb: database creation failed: ERROR: invalid locale name hu_HU.utf8

Postgresql is on Debian. Default locale is en_US.utf8

Any idea is appreciated.

Search Discussions

  • Thom Brown at Jun 21, 2010 at 8:52 pm

    On 21 June 2010 21:28, Laslo Forro wrote:
    Hi there,
    I am trying to set the --locale for a database but receive 'invalid locale
    name'
    Here is the posgresql.conf part:
    lc_messages = 'en_US.UTF-8' # locale for system error message
    # strings
    lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
    lc_numeric = 'en_US.UTF-8' # locale for number formatting
    lc_time = 'en_US.UTF-8' # locale for time formatting
    default_text_search_config = 'pg_catalog.english'
    locale -a says:
    C
    en_US.utf8
    hu_HU.utf8
    POSIX
    I would like to use hu_HU.utf8:
    createdb -E UTF8 --locale='hu_HU.utf8' test
    Password:
    createdb: database creation failed: ERROR:  invalid locale name hu_HU.utf8
    Postgresql is on Debian. Default locale is en_US.utf8
    Any idea is appreciated.
    What do you get with: locale -a | grep hr_HR

    Thom
  • Thom Brown at Jun 21, 2010 at 8:55 pm

    On 21 June 2010 21:51, Thom Brown wrote:
    On 21 June 2010 21:28, Laslo Forro wrote:
    Hi there,
    I am trying to set the --locale for a database but receive 'invalid locale
    name'
    Here is the posgresql.conf part:
    lc_messages = 'en_US.UTF-8' # locale for system error message
    # strings
    lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
    lc_numeric = 'en_US.UTF-8' # locale for number formatting
    lc_time = 'en_US.UTF-8' # locale for time formatting
    default_text_search_config = 'pg_catalog.english'
    locale -a says:
    C
    en_US.utf8
    hu_HU.utf8
    POSIX
    I would like to use hu_HU.utf8:
    createdb -E UTF8 --locale='hu_HU.utf8' test
    Password:
    createdb: database creation failed: ERROR:  invalid locale name hu_HU.utf8
    Postgresql is on Debian. Default locale is en_US.utf8
    Any idea is appreciated.
    What do you get with: locale -a | grep hr_HR

    Thom
    Erk... no, my mistake. Ignore my last message.

    In any case, shouldn't it be: createdb -E utf8 --locale='hu_HU' test

    Thom
  • Laslo Forro at Jun 22, 2010 at 8:42 am
    Does it mean that I have to initdb postgresql with the locale settings?
    On Mon, Jun 21, 2010 at 10:54 PM, Thom Brown wrote:
    On 21 June 2010 21:51, Thom Brown wrote:
    On 21 June 2010 21:28, Laslo Forro wrote:
    Hi there,
    I am trying to set the --locale for a database but receive 'invalid
    locale
    name'
    Here is the posgresql.conf part:
    lc_messages = 'en_US.UTF-8' # locale for system error message
    # strings
    lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
    lc_numeric = 'en_US.UTF-8' # locale for number formatting
    lc_time = 'en_US.UTF-8' # locale for time formatting
    default_text_search_config = 'pg_catalog.english'
    locale -a says:
    C
    en_US.utf8
    hu_HU.utf8
    POSIX
    I would like to use hu_HU.utf8:
    createdb -E UTF8 --locale='hu_HU.utf8' test
    Password:
    createdb: database creation failed: ERROR: invalid locale name
    hu_HU.utf8
    Postgresql is on Debian. Default locale is en_US.utf8
    Any idea is appreciated.
    What do you get with: locale -a | grep hr_HR

    Thom
    Erk... no, my mistake. Ignore my last message.

    In any case, shouldn't it be: createdb -E utf8 --locale='hu_HU' test

    Thom

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedJun 21, '10 at 8:28p
activeJun 22, '10 at 8:42a
posts4
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

Laslo Forro: 2 posts Thom Brown: 2 posts

People

Translate

site design / logo © 2022 Grokbase