Re: Encoding problem using pg_dumpall

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Encoding problem using pg_dumpall
Дата
Msg-id 4981EB35.5060106@hagander.net
обсуждение исходный текст
Ответ на Re: Encoding problem using pg_dumpall  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> Tom Lane wrote:
>>> (Hmm, actually it looks like pg_dumpall hasn't got a -E switch,
>>> which seems like an oversight.  So you need to fix your locale,
>>> or else use pg_dump directly.)
>
>> IIRC, you can't set the windows console to be UTF8.
>
> Ugh.  That seems to raise the priority of having a -E switch quite
> a lot.  I'm surprised no one has complained of this before.

Most people use pg_dump. I know I recommend everbody to use pg_dump to
dump the database, because you can use -Fc. Then just use pg_dumpall to
dump the globals, and they normally don't have any non-ascii in them.


> I think it should be possible to work around it by setting
> PGCLIENTENCODING in the environment, but I dunno how to do that
> on Windows.

That's a simple
set PGCLIENTENCODING=UTF8

//Magnus


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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Pet Peeves?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Full backup - pg_dumpall sufficient?