Skip to content

Commit 84914e9

Browse files
committed
pg_restore: Fix wrong descriptions of --with-{schema,data,statistics} options.
Commit bde2fb7 added the --with-schema, --with-data, and --with-statistics options to pg_restore. These options control whether to restore schema, data, or statistics if present in the archive. However, the help message and documentation incorrectly described them as affecting what gets dumped. This commit corrects those descriptions to clarify that the options control restoration, not dumping. Bug: #18952 Reported-by: TAKATSUKA Haruka <harukat@sraoss.co.jp> Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: TAKATSUKA Haruka <harukat@sraoss.co.jp> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://postgr.es/m/18952-be40a620f8b1e755@postgresql.org
1 parent 0f65f3e commit 84914e9

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

doc/src/sgml/ref/pg_restore.sgml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,8 @@ PostgreSQL documentation
923923
<term><option>--with-data</option></term>
924924
<listitem>
925925
<para>
926-
Dump data. This is the default.
926+
Output commands to restore data, if the archive contains them.
927+
This is the default.
927928
</para>
928929
</listitem>
929930
</varlistentry>
@@ -932,7 +933,8 @@ PostgreSQL documentation
932933
<term><option>--with-schema</option></term>
933934
<listitem>
934935
<para>
935-
Dump schema (data definitions). This is the default.
936+
Output commands to restore schema (data definitions), if the archive
937+
contains them. This is the default.
936938
</para>
937939
</listitem>
938940
</varlistentry>
@@ -941,7 +943,8 @@ PostgreSQL documentation
941943
<term><option>--with-statistics</option></term>
942944
<listitem>
943945
<para>
944-
Dump statistics. This is the default.
946+
Output commands to restore statistics, if the archive contains them.
947+
This is the default.
945948
</para>
946949
</listitem>
947950
</varlistentry>

src/bin/pg_dump/pg_restore.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -712,9 +712,9 @@ usage(const char *progname)
712712
printf(_(" --use-set-session-authorization\n"
713713
" use SET SESSION AUTHORIZATION commands instead of\n"
714714
" ALTER OWNER commands to set ownership\n"));
715-
printf(_(" --with-data dump the data\n"));
716-
printf(_(" --with-schema dump the schema\n"));
717-
printf(_(" --with-statistics dump the statistics\n"));
715+
printf(_(" --with-data restore the data\n"));
716+
printf(_(" --with-schema restore the schema\n"));
717+
printf(_(" --with-statistics restore the statistics\n"));
718718

719719
printf(_("\nConnection options:\n"));
720720
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy