Re: Encoding questions

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Encoding questions
Дата
Msg-id 7FCA9ADE-E7C9-4C0D-A66B-E7D241B92202@seespotcode.net
обсуждение исходный текст
Ответ на Encoding questions  ("Pat Maddox" <pergesu@gmail.com>)
Список pgsql-general
On Jul 8, 2007, at 14:09 , Pat Maddox wrote:

> Can I just convert it, or do I need to dump
> it, drop it, recreate with UTF-8, and then load the data?

It depends on what is currently in your (SQL_ASCII) database. If it's
only ASCII data or all non-ASCII data is UTF-8, you should be okay
just dumping the data and loading it into a new database with UTF8
encoding.

If this isn't the case, you'll need to clean the dump somehow,
probably using iconv.

> Also is it possible to change the default encoding for databases as
> well?

AFAIK, you can't change the default encoding after it's been set by
initdb, but you can set the encoding at database creation time. See
the CREATE DATABASE or createdb documentation on how to do this.

Michael Glaesemann
grzm seespotcode net



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

Предыдущее
От: "Pat Maddox"
Дата:
Сообщение: Encoding questions
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Problem with autovacuum and pg_autovacuum