Re: Changing DB Encodings

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Changing DB Encodings
Дата
Msg-id 13823.1183848051@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Changing DB Encodings  (Naz Gassiep <naz@mira.net>)
Ответы Re: Changing DB Encodings  (Naz Gassiep <naz@mira.net>)
Список pgsql-general
Naz Gassiep <naz@mira.net> writes:
> Why have I been told that I need to do a re initdb to change the char
> encoding? The man says i can just     createdb foodb -E utf8    so why
> would i need to dump/initdb/create/restore? cant i just dump/create/restore?

Are you clear on the difference between encoding and locale?

You can make new databases with whatever encoding you say, but the
server's lc_collate and lc_ctype are frozen at initdb, and it will
not work well to select an encoding that is incompatible with the
locale setting.  In practice this means that you can only use multiple
database encodings when you initdb'd in "C" locale; all other locale
settings imply a particular encoding.

Yes, this is pretty annoying.  No, it's not easy to fix.

            regards, tom lane

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

Предыдущее
От: Naz Gassiep
Дата:
Сообщение: Changing DB Encodings
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: catalog location