Re: change encoding

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: change encoding
Дата
Msg-id 20080513080913.GC19436@svana.org
обсуждение исходный текст
Ответ на change encoding  ("J. Manuel Velasco - UBILIBET" <tech@ubilibet.com>)
Ответы Re: change encoding
Список pgsql-general
On Tue, May 13, 2008 at 09:00:49AM +0200, J. Manuel Velasco - UBILIBET wrote:
> Hello,
>
> I have installed a new postgresql server and I need to recover an old
> database on it.
> The database I have to recover has LATIN2 as encoding and when i try to
> restore it into the new one I get error messages due to encoding.
> I have read that from pgsql8-3 is not possible to have different
> encoding and since by default the encoding for postgres is UTF8 my doubt
> is how can I restore the old database with no errors.

The encoding must match the collation, that's all. You don't say what
you are recovering, but pg_dump emits a "SET client_encoding=latin2",
right? In which case it should just work.

If it's something else you need to show us exactly what the error
message is.

If you want everything connecting to the database to think it's latin2,
do:

ALTER DATABASE foo SET client_encoding=latin2;

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Вложения

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

Предыдущее
От: "J. Manuel Velasco - UBILIBET"
Дата:
Сообщение: change encoding
Следующее
От: "Hiroshi Saito"
Дата:
Сообщение: Re: Compiling trigger function with MinGW