Re: Cannot create UTF-8 database

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cannot create UTF-8 database
Дата
Msg-id 28972.1268411196@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Cannot create UTF-8 database  ("Carlson, Jacob" <jacob.carlson@navteq.com>)
Список pgsql-bugs
"Carlson, Jacob" <jacob.carlson@navteq.com> writes:
> I am trying to create a UNICODE schema and am getting an error.  Is there a configuration file I need to update to
exceptUnicode schemas?  I am using this version of software - postgresql-8.3.8-S10.i386-64.tar. 
> To note, I am able to create an ASCII encoded schema with no problem.

Postgres tries to prevent you from selecting an incompatible combination
of locale and encoding.  In general, the locale support presumes a
specific character encoding for any given locale setting, so if you were
to set a database encoding different from that, you would get strange
misbehaviors in areas like text sorting, upper/lowercasing, etc.

> Unicode Error:

> postgres=# create database "apt_utf8" with encoding = 'UNICODE';
> ERROR:  encoding UTF8 does not match server's locale C
> DETAIL:  The server's LC_CTYPE setting requires encoding LATIN1.

Hm, that is odd.  C locale is normally considered encoding-agnostic
(because it doesn't do anything with characters outside the ASCII
range).  What platform is this on?

The short answer to your question is that you're going to need to
re-initdb with a utf8-compatible locale setting, but I'm just wondering
why it wouldn't let you do it in C locale ...

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: BUG #5364: citext behavior when type not in public schema
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5372: insert into fails with integer expression type char error