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 201112211146.55547.adrian.klaver@gmail.com
Whole thread Raw
In response to How to create database with default system locale is set to et_EE.UTF-8  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general
On Wednesday, December 21, 2011 10:28:24 am Andrus wrote:
> In fresh Debian installation default system locale is set to et_EE.UTF-8
> using
>
> dpkg-reconfigure locales
>
> Postgres is installed using
>
> apt-get update
> apt-get -t squeeze-backports install postgresql-9.1 postgresql-common
> postgresql-contrib
>
> Trying to create database with et_EE.UTF-8 collation and character type
> returns error
>
> ---------------------------
> pgAdmin III
> ---------------------------
> An error has occurred:
>
> ERROR:  new collation (et_EE.UTF-8) is incompatible with the collation of
> the template database (en_US.UTF-8) HINT:  Use the same collation as in
> the template database, or use template0 as template.
                                         ^^^^^^^^^^^^^^^^^^
See below for more info.

>
> How to create new database with et_EE.UTF-8 collation and character type ?

http://www.postgresql.org/docs/9.1/interactive/multibyte.html
22.3.2. Setting the Character Set


Notice that the above commands specify copying the template0 database. When
copying any other database, the encoding and locale settings cannot be changed
from those of the source database, because that might result in corrupt data.
For more information see Section 21.3."

From Section 21.3:
"To create a database by copying template0, use:

CREATE DATABASE dbname TEMPLATE template0;
"


> How to force Postgres installation to create template1 with et_EE.UTF-8
> collation and character type ?
>
> Andrus.

--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: akp geek
Date:
Subject: Re: Postgres Logs question
Next
From: Andre Lopes
Date:
Subject: How to escape to quotes on Insert into?