mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add --encoding to pg_dump.
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. Magnus Hagander
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.78 2005/06/21 20:45:43 tgl Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.79 2005/07/10 15:08:52 momjian Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -194,6 +194,18 @@ PostgreSQL documentation
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-E <replaceable class="parameter">encoding</replaceable></option></term>
|
||||
<term><option>--encoding=<replaceable class="parameter">encoding</replaceable></option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Create the dump in the specified encoding. By default, the dump is
|
||||
created in the database encoding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-f <replaceable class="parameter">file</replaceable></option></term>
|
||||
<term><option>--file=<replaceable class="parameter">file</replaceable></option></term>
|
||||
|
Reference in New Issue
Block a user