Problems with a custom LOCALE

From: "James B(dot) Byrne" <byrnejb(at)harte-lyne(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Problems with a custom LOCALE
Date: 2012-12-14 21:33:16
Message-ID: c5fe56d3b6a23bb11300e0c169595c83.squirrel@webmail.harte-lyne.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)yyyy-mmm-dd(dot)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(at)yyyy-mmm-dd(dot)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(at)Harte-Lyne(dot)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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-12-14 22:40:27 Re: Problems with a custom LOCALE
Previous Message Kevin Grittner 2012-12-14 20:56:21 Re: Quickly making a column non-nullable (without a table scan)