Re: How to create database with default system locale is set to et_EE.UTF-8 - Mailing list pgsql-general

From Adrian Klaver
Subject Re: How to create database with default system locale is set to et_EE.UTF-8
Date
Msg-id 201112220859.28490.adrian.klaver@gmail.com
Whole thread Raw
In response to Re: How to create database with default system locale is set to et_EE.UTF-8  ("Andrus" <kobruleht2@hot.ee>)
Responses Re: How to create database with default system locale is set to et_EE.UTF-8
List 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.klaver@gmail.com

pgsql-general by date:

Previous
From: Bèrto ëd Sèra
Date:
Subject: Re: How to create database with default system locale is set to et_EE.UTF-8
Next
From: "Andrus"
Date:
Subject: Re: How to create database with default system locale is set to et_EE.UTF-8