Re: Change/convert encoding?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Change/convert encoding?
Дата
Msg-id 7708.971130905@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Change/convert encoding?  (Erno Kuusela <erno@iki.fi>)
Список pgsql-general
Erno Kuusela <erno@iki.fi> writes:
> i have a database and in it strings with accented characters in
> latin-1 encoding, but the database has been mistakenly created with
> unicode encoding. as you all know this makes pg_dump break.

> what i'm enquiring is - is there a way to change the encoding
> and preserve the data? i only know of one way to specify the
> encoding, initdb -e, but afaik that will nuke all the data also.

I believe you could just reach into pg_database and update the
encoding field for that DB.  Probably best to do so with a backend
connected to a different DB, like template1.

            regards, tom lane

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

Предыдущее
От: "Raymond O'Donnell"
Дата:
Сообщение: ADO transaction funny
Следующее
От: Michael Ansley
Дата:
Сообщение: OIDs