From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | "Andrus" <kobruleht2(at)hot(dot)ee> |
Cc: | Bèrto ëd Sèra <berto(dot)d(dot)sera(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to create database with default system locale is set to et_EE.UTF-8 |
Date: | 2011-12-22 16:59:27 |
Message-ID: | 201112220859.28490.adrian.klaver@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thursday, December 22, 2011 8:29:11 am Andrus wrote:
> Adrian and Bèrto,
>
> Thank you very much for quick and excellent replies. Locale names are
> different in every Linux distro.
> Postgresql does not provide any way to retrieve them (ssh access is reqired
> to retireve them using locale -a)
>
> Thus suggection using hard coded locale names is not possible.
>
> How to force server to use et_EE.UTF-8 as default locale without hard
> coding it into application?
What application?
>
> How to force command
>
> CREATE DATABASE <yourdbname> TEMPLATE = template0
>
> to use et_EE.UTF-8 locale by default ?
Well you would use template0 as the TEMPLATE only if you wanted to CREATE a
database with different collation than that in template1(the default template for
the CREATE DATABASE command). So the question then is, why is the database
cluster being created with a collation of en_US.UTF-8 when the locale is
supposed to have been set to et_EE.UTF-8?
First are you sure that dpkg-reconfigure locales is actually resetting the
locale?
Second when you connect to the cluster with psql what does \l show for encoding
and collation?
>
> Andrus.
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Andrus | 2011-12-22 17:00:21 | Re: How to create database with default system locale is set to et_EE.UTF-8 |
Previous Message | Bèrto ëd Sèra | 2011-12-22 16:57:26 | Re: How to create database with default system locale is set to et_EE.UTF-8 |