Problems with a custom LOCALE - Mailing list pgsql-general

From James B. Byrne
Subject Problems with a custom LOCALE
Date
Msg-id c5fe56d3b6a23bb11300e0c169595c83.squirrel@webmail.harte-lyne.ca
Whole thread Raw
Responses Re: Problems with a custom LOCALE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Having got the 9.2 instance running in parallel with the previous
version I am now encountering this difficulty:

Couldn't create database for {"adapter"=>"postgresql",
"collate"=>"en_US.UTF-8", "ctype"=>"en_US.UTF-8", "encoding"=>"UTF8",
"database"=>"hll_th_forex_development",
"host"=>"inet01.hamilton.harte-lyne.ca", "pool"=>"5",
"password"=>"hll_theheart_devl_password", "sslmode"=>"require",
"template"=>"template1", "username"=>"hll_theheart_db_devl"}
PG::Error: ERROR:  encoding "UTF8" does not match locale
"en_CA@yyyy-mmm-dd.UTF-8"
DETAIL:  The chosen LC_CTYPE setting requires encoding "LATIN1".
: CREATE DATABASE "hll_th_forex_test" ENCODING = 'UTF8' TEMPLATE =
"template1"

I am constructing this remotely using a Rake task borrowed from Ruby
on Rails 3.2.9 and employing ActiveRecord-3.2.9.  We use a custom
local on all our servers "en_CA@yyyy-mmm-dd.UTF-8" which differs from
en_CA only in the presentation of the date.  However, regardless of
the system setting, postgresql.conf was configured thus:

# These settings are initialized by initdb, but they can be changed.
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


So, what is going wrong here?

--
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3



pgsql-general by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Quickly making a column non-nullable (without a table scan)
Next
From: Tom Lane
Date:
Subject: Re: Problems with a custom LOCALE