Re: Change postgresql encoding

Поиск
Список
Период
Сортировка
От BladeOfLight16
Тема Re: Change postgresql encoding
Дата
Msg-id CA+=1U=UhYEHbDWBtsr9pp7y5mLyXEDH4UDVBqtdbUSxFwr9BPw@mail.gmail.com
обсуждение исходный текст
Ответ на Change postgresql encoding  (Oliver <ofabelo@gmail.com>)
Ответы Re: Change postgresql encoding  (Oliver <ofabelo@gmail.com>)
Список pgsql-general
On Sun, Feb 8, 2015 at 2:20 PM, Oliver <ofabelo@gmail.com> wrote:
If I want change postgresql encoding, I have understood that I should reinstall postgresql (I do installation from rpm official binary files for red hat)

I can't answer your question about whether the encodings need to be the same, but I'm pretty sure that's not true. CREATE DATABASE has options to set the encoding for a database:

CREATE DATABASE korean WITH ENCODING 'EUC_KR' LC_COLLATE='ko_KR.euckr' LC_CTYPE='ko_KR.euckr' TEMPLATE=template0;

(From http://www.postgresql.org/docs/9.4/static/multibyte.html)

To change the encoding of an existing PG database, you have to 1) dump it, 2) create a new, empty DB with the desired encoding, and 3) import the dump into the new DB. So you can't really change it "on the fly," but it can be done at creation time.

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Change postgresql encoding
Следующее
От: Tim Uckun
Дата:
Сообщение: Re: Partioning with overlapping and non overlapping constraints