Обсуждение: Re: [HACKERS] Proposed TODO: --encoding option for pg_dump

Поиск
Список
Период
Сортировка

Re: [HACKERS] Proposed TODO: --encoding option for pg_dump

От
"Magnus Hagander"
Дата:
> There's no time to do this for 8.1, but I'd like to get it on
> the books for
> 8.2:
>
> The Problem:  Occassionally a DBA needs to dump a database to a new
> encoding.   In instances where the current encoding, (or lack of an
> encoding, like SQL_ASCII) is poorly supported on the target
> database server, it can be useful to dump into a particular
> encoding.  But, currently the only way to set the encoding of
> a pg_dump file is to change
> client_encoding in postgresql.conf and restart postmaster.
> This is more
> than a little awkward for production systems.
>
> The TODO:  add an --encoding=[encoding name] option to
> pg_dump.  This would set client_encoding for pg_dump's session(s).

I *think* that's easy enough to do in time for 8.1. Trivial patch
attached. I hope it's enough :-) It passed my very quick testing...

(Yup, I read the mails aobut PGCLIENTENCODING, but an option to pg_dump
is certainly easier)

//Magnus

Re: [HACKERS] Proposed TODO: --encoding option for pg_dump

От
Alvaro Herrera
Дата:
On Tue, Jun 28, 2005 at 10:24:19PM +0200, Magnus Hagander wrote:

> I *think* that's easy enough to do in time for 8.1. Trivial patch
> attached. I hope it's enough :-) It passed my very quick testing...
>
> (Yup, I read the mails aobut PGCLIENTENCODING, but an option to pg_dump
> is certainly easier)

You forgot to document the long option, I think.

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"No necesitamos banderas
 No reconocemos fronteras"                  (Jorge González)

Re: [HACKERS] Proposed TODO: --encoding option for pg_dump

От
"Michael Paesold"
Дата:
Alvaro Herrera wrote:


> On Tue, Jun 28, 2005 at 10:24:19PM +0200, Magnus Hagander wrote:
>
>> I *think* that's easy enough to do in time for 8.1. Trivial patch
>> attached. I hope it's enough :-) It passed my very quick testing...
>>
>> (Yup, I read the mails aobut PGCLIENTENCODING, but an option to pg_dump
>> is certainly easier)
>
> You forgot to document the long option, I think.

Are the man pages generated from the sgml docs? Have never had a look at
that.

Best Regards,
Michael Paesold