Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7af5ea7

Browse files
committed
Reimplement pg_dumpall in C. Currently no change in functionality,
except that it's more robust, reconnects less often, and is NLS'ed.
1 parent6deb649 commit7af5ea7

File tree

13 files changed

+954
-521
lines changed

13 files changed

+954
-521
lines changed

‎doc/src/sgml/ref/pg_dump.sgml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.48 2002/08/18 09:36:25 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.49 2002/08/27 18:57:26 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -112,13 +112,13 @@ PostgreSQL documentation
112112
does not block other users accessing the database (readers or
113113
writers).
114114
</para>
115+
</refsect1>
115116

116-
<refsect2 id="pg-dump-options">
117-
<title>Options</title>
117+
<refsect1 id="pg-dump-options">
118+
<title>Options</title>
118119

119-
<para>
120-
<command>pg_dump</command> accepts the following command
121-
line arguments. (Long option forms are only available on some platforms.)
120+
<para>
121+
The following command-line options are used to control the output format.
122122

123123
<variablelist>
124124
<varlistentry>
@@ -408,7 +408,9 @@ PostgreSQL documentation
408408
<term><option>--verbose</></term>
409409
<listitem>
410410
<para>
411-
Specifies verbose mode.
411+
Specifies verbose mode. This will cause
412+
<application>pg_dump</application> to print progress messages
413+
to standard error.
412414
</para>
413415
</listitem>
414416
</varlistentry>
@@ -499,13 +501,11 @@ PostgreSQL documentation
499501
</para>
500502
</listitem>
501503
</varlistentry>
502-
503-
504504
</variablelist>
505505
</para>
506+
506507
<para>
507-
<command>pg_dump</command> also accepts
508-
the following command line arguments for connection parameters:
508+
The following command-line options control the database connection parameters.
509509

510510
<variablelist>
511511
<varlistentry>
@@ -555,8 +555,10 @@ PostgreSQL documentation
555555
</varlistentry>
556556
</variablelist>
557557
</para>
558-
</refsect2>
559558

559+
<para>
560+
Long option forms are only available on some platforms.
561+
</para>
560562
</refsect1>
561563

562564
<refsect1>

‎doc/src/sgml/ref/pg_dumpall.sgml

Lines changed: 152 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.31 2002/08/2703:55:17 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.32 2002/08/2718:57:26 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -12,18 +12,13 @@ PostgreSQL documentation
1212

1313
<refnamediv>
1414
<refname>pg_dumpall</refname>
15-
<refpurpose>extractall <productname>PostgreSQL</productname>databases into a script file</refpurpose>
15+
<refpurpose>extracta <productname>PostgreSQL</productname>database cluster into a script file</refpurpose>
1616
</refnamediv>
1717

1818
<refsynopsisdiv>
1919
<cmdsynopsis>
2020
<command>pg_dumpall</command>
21-
<group><arg>-c</arg><arg>--clean</arg></group>
22-
<group><arg>-g</arg><arg>--globals-only</arg></group>
23-
<arg>-h <replaceable>host</replaceable></arg>
24-
<arg>-p <replaceable>port</replaceable></arg>
25-
<arg>-U <replaceable>username</replaceable></arg>
26-
<arg>-W</arg>
21+
<arg rep="repeat"><replaceable>options</replaceable></arg>
2722
</cmdsynopsis>
2823
</refsynopsisdiv>
2924

@@ -66,97 +61,161 @@ PostgreSQL documentation
6661
The SQL script will be written to the standard output. Shell
6762
operators should be used to redirect it into a file.
6863
</para>
69-
70-
71-
<para>
72-
<application>pg_dumpall</application> will need to connect several times to the
73-
<productname>PostgreSQL</productname> server, asking for the password each
74-
time. It will probably be very convenient to have a PGPASSWORDFILE in that case.
75-
</para>
76-
7764
</refsect1>
7865

7966
<refsect1>
8067
<title>Options</title>
8168

82-
<para>
83-
<application>pg_dumpall</application> accepts the following
84-
command line arguments:
69+
<para>
70+
The following command-line options are used to control the output format.
8571

86-
<variablelist>
87-
<varlistentry>
88-
<term>-c, --clean</term>
89-
<listitem>
90-
<para>
72+
<variablelist>
73+
<varlistentry>
74+
<term>-c, --clean</term>
75+
<listitem>
76+
<para>
9177
Include SQL commands to clean (drop) database objects before
9278
recreating them. (This option is fairly useless, since the
9379
output script expects to create the databases themselves;
9480
they would always be empty upon creation.)
95-
</para>
96-
</listitem>
97-
</varlistentry>
98-
99-
<varlistentry>
100-
<term>-g, --globals-only</term>
101-
<listitem>
102-
<para>
81+
</para>
82+
</listitem>
83+
</varlistentry>
84+
85+
<varlistentry>
86+
<term><option>-d</option></term>
87+
<term><option>--inserts</option></term>
88+
<listitem>
89+
<para>
90+
Dump data as <command>INSERT</command> commands (rather
91+
than <command>COPY</command>). This will make restoration very
92+
slow, but it makes the output more portable to other RDBMS
93+
packages.
94+
</para>
95+
</listitem>
96+
</varlistentry>
97+
98+
<varlistentry>
99+
<term><option>-D</option></term>
100+
<term><option>--column-inserts</option></term>
101+
<term><option>--attribute-inserts</option></term>
102+
<listitem>
103+
<para>
104+
Dump data as <command>INSERT</command> commands with explicit
105+
column names (<literal>INSERT INTO
106+
<replaceable>table</replaceable>
107+
(<replaceable>column</replaceable>, ...) VALUES
108+
...</literal>). This will make restoration very slow,
109+
but it is necessary if you desire to rearrange column ordering.
110+
</para>
111+
</listitem>
112+
</varlistentry>
113+
114+
<varlistentry>
115+
<term>-g, --globals-only</term>
116+
<listitem>
117+
<para>
103118
Only dump global objects (users and groups), no databases.
104-
</para>
105-
</listitem>
106-
</varlistentry>
107-
108-
<varlistentry>
109-
<term>-h <replaceable>host</replaceable></term>
110-
<listitem>
111-
<para>
119+
</para>
120+
</listitem>
121+
</varlistentry>
122+
123+
<varlistentry>
124+
<term><option>-i</></term>
125+
<term><option>--ignore-version</></term>
126+
<listitem>
127+
<para>
128+
Ignore version mismatch between
129+
<application>pg_dumpall</application> and the database server.
130+
Since <application>pg_dumpall</application> knows a great deal
131+
about system catalogs, any given version of
132+
<application>pg_dumpall</application> is only intended to work
133+
with the corresponding release of the database server. Use
134+
this option if you need to override the version check (and if
135+
<application>pg_dumpall</application> then fails, don't say
136+
you weren't warned).
137+
</para>
138+
</listitem>
139+
</varlistentry>
140+
141+
<varlistentry>
142+
<term><option>-o</></term>
143+
<term><option>--oids</></term>
144+
<listitem>
145+
<para>
146+
Dump object identifiers (<acronym>OID</acronym>s) for every
147+
table. Use this option if your application references the OID
148+
columns in some way (e.g., in a foreign key constraint).
149+
Otherwise, this option should not be used.
150+
</para>
151+
</listitem>
152+
</varlistentry>
153+
154+
<varlistentry>
155+
<term><option>-v</></term>
156+
<term><option>--verbose</></term>
157+
<listitem>
158+
<para>
159+
Specifies verbose mode. This will cause
160+
<application>pg_dumpall</application> to print progress
161+
messages to standard error.
162+
</para>
163+
</listitem>
164+
</varlistentry>
165+
</variablelist>
166+
</para>
167+
168+
<para>
169+
The following command-line options control the database connection parameters.
170+
171+
<variablelist>
172+
<varlistentry>
173+
<term>-h <replaceable>host</replaceable></term>
174+
<listitem>
175+
<para>
112176
Specifies the host name of the machine on which the database
113177
server is running. If host begins with a slash, it is used as
114178
the directory for the Unix domain socket. The default is
115179
taken from the <envar>PGHOST</envar> environment variable, if
116180
set, else a Unix domain socket connection is attempted.
117-
</para>
118-
</listitem>
119-
</varlistentry>
120-
121-
<varlistentry>
122-
<term>-p <replaceable>port</replaceable></term>
123-
<listitem>
124-
<para>
181+
</para>
182+
</listitem>
183+
</varlistentry>
184+
185+
<varlistentry>
186+
<term>-p <replaceable>port</replaceable></term>
187+
<listitem>
188+
<para>
125189
The port number on which the server is listening. Defaults to
126190
the <envar>PGPORT</envar> environment variable, if set, or a
127191
compiled-in default.
128-
</para>
129-
</listitem>
130-
</varlistentry>
131-
132-
<varlistentry>
133-
<term>-U <replaceable>username</replaceable></term>
134-
<listitem>
135-
<para>
192+
</para>
193+
</listitem>
194+
</varlistentry>
195+
196+
<varlistentry>
197+
<term>-U <replaceable>username</replaceable></term>
198+
<listitem>
199+
<para>
136200
Connect as the given user.
137-
</para>
138-
</listitem>
139-
</varlistentry>
140-
141-
<varlistentry>
142-
<term>-W</term>
143-
<listitem>
144-
<para>
201+
</para>
202+
</listitem>
203+
</varlistentry>
204+
205+
<varlistentry>
206+
<term>-W</term>
207+
<listitem>
208+
<para>
145209
Force a password prompt. This should happen automatically if
146210
the server requires password authentication.
147-
</para>
148-
</listitem>
149-
</varlistentry>
211+
</para>
212+
</listitem>
213+
</varlistentry>
150214
</variablelist>
151215
</para>
152216

153217
<para>
154-
Any other command line parameters are passed to the underlying
155-
<xref linkend="app-pgdump">
156-
calls. This is useful to control some aspects of the output
157-
format, but some options such as <option>-f</option>,
158-
<option>-F</option>, <option>-t</option>, and <replaceable
159-
class="parameter">dbname</replaceable> should be avoided.
218+
Long options are only available on some platforms.
160219
</para>
161220
</refsect1>
162221

@@ -180,6 +239,26 @@ PostgreSQL documentation
180239
</refsect1>
181240

182241

242+
<refsect1>
243+
<title>Notes</title>
244+
245+
<para>
246+
Since <application>pg_dumpall</application> calls
247+
<application>pg_dump</application> internally, some diagnostic
248+
messages will refer to <application>pg_dump</application>.
249+
</para>
250+
251+
<para>
252+
<application>pg_dumpall</application> will need to connect several
253+
times to the <productname>PostgreSQL</productname> server. If password
254+
authentication is configured, it will ask for a password each time. In
255+
that case it would be convenient to set up a password file.
256+
</para>
257+
258+
<comment>But where is that password file documented?</comment>
259+
</refsect1>
260+
261+
183262
<refsect1 id="app-pg-dumpall-ex">
184263
<title>Examples</title>
185264
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp