Re: [SOLVED] Problems with a custom LOCALE - Mailing list pgsql-general

From Tom Lane
Subject Re: [SOLVED] Problems with a custom LOCALE
Date
Msg-id 26477.1355762803@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SOLVED] Problems with a custom LOCALE  ("James B. Byrne" <byrnejb@harte-lyne.ca>)
List pgsql-general
"James B. Byrne" <byrnejb@harte-lyne.ca> writes:
> PG::Error: ERROR:  new encoding (UTF8) is incompatible with the
> encoding of the template database (LATIN1)
> HINT:  Use the same encoding as in the template database, or use
> template0 as template.
> : CREATE DATABASE "hll_th_forex_development" ENCODING = 'UTF-8'

> So, I now must specify a template in the database connection, where I
> did not need to before. Furthermore, the template I must use is
> template0 because regardless of what locale initdb is run in template1
> evidently is always created with LATIN1 encoding.  At lease if there
> is a way to force template1 to utf8 during initdb I now lack the
> energy to discover it.

You could use initdb's -E option, but really it ought to default to the
charmap of the locale that prevails from its environment.  I suspect
there's still something wonky about your custom locale.  (But man,
your description of localedef is scary.)

            regards, tom lane


pgsql-general by date:

Previous
From: "James B. Byrne"
Date:
Subject: Re: [SOLVED] Problems with a custom LOCALE
Next
From: David Wall
Date:
Subject: Re: PG 8.4 to 9.2 upgrade issues with ownership of large objects