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

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: How to create database with default system locale is set to et_EE.UTF-8
Дата
Msg-id 201112211146.55547.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на How to create database with default system locale is set to et_EE.UTF-8  ("Andrus" <kobruleht2@hot.ee>)
Список 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 по дате отправления:

Предыдущее
От: akp geek
Дата:
Сообщение: Re: Postgres Logs question
Следующее
От: Andre Lopes
Дата:
Сообщение: How to escape to quotes on Insert into?