Re: pg_restore errors

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_restore errors
Дата
Msg-id 23912.1200970165@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_restore errors  (Kevin Kempter <kevin@kevinkempterllc.com>)
Список pgsql-admin
Kevin Kempter <kevin@kevinkempterllc.com> writes:
> Trying to restore a pg_dump I get this:
> pg_restore: ERROR:  invalid byte sequence for encoding "UTF8": 0xae
> HINT:  This error can also happen if the byte sequence does not match the
> encoding expected by the server, which is controlled by "client_encoding".

> This is a dump file that was handed to me from a client. I don't know
> anything about what the dump flags were or what the db encoding
> was. Is there a way to find out (I'm assuming this is an encoding
> mis-match) from the dump file.

Well, the fact that you got that message says that the original database
was, or thought it was, in UTF8 encoding: pg_dump would have propagated
that fact into a "set client_encoding" command in the dump script.

I suppose that this data got loaded into the database while it was being
run by one of the early 8.1.x releases that didn't check encoding very
carefully :-(.  You're going to have to guess what the real encoding is;
querying the client about his typical locale settings might help.

When trying to fix up the data, keep in mind that what you have now is
likely a mix of real UTF8 and whatever-this-is.

            regards, tom lane

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

Предыдущее
От: "Phillip Smith"
Дата:
Сообщение: Re: pg_restore errors
Следующее
От: Guillermo Arias
Дата:
Сообщение: how to create a limited user