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

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "Adrian Klaver" <adrian(dot)klaver(at)gmail(dot)com>
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 17:45:16
Message-ID: D9AA39E54DBA4DCC84C894F5F3EEE411@dell2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> What application?

My application.

>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?

dpkg-reconfigure locales
Generating locales (this might take a while)...
en_US.UTF-8... done
et_EE.UTF-8... done
Generation complete.
*** update-locale: Warning: LANGUAGE ("en_US:en") is not compatible with
LANG (et_EE.UTF-8). Disabling it.

> Second when you connect to the cluster with psql what does \l show for
> encoding
> and collation?

psql postgres
psql (9.1.1)
Type "help" for help.

postgres=> \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access
privileges
-----------+------------+----------+-------------+-------------+-----------------------

postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
+
| | | | |
postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
+
| | | | |
postgres=CTc/postgres

Andrus.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hanns Hartman 2011-12-22 17:50:29 Re: Trying to understand postgres crash
Previous Message Юра Величко 2011-12-22 17:32:09 Default value of column in information_schema