On Mon, Nov 18, 2024 at 05:14:53PM -0500, Tom Lane wrote: > Marcos Pegoraro <mar...@f10.com.br> writes: > > But it would be good to have this patch applied to all supported versions, > > as soon as nothing was changed on that pg_dump option, no ? > > Even more to the point, should we change pg_dump's help output? > > ... > --load-via-partition-root load partitions via the root table > --no-comments do not dump comments > --no-publications do not dump publications > ... > > Also, the identical text appears in pg_dumpall's man page and help > output, while pg_restore has a differently worded version: > > printf(_(" --no-comments do not restore comments\n")); > > pg_restore's man page seems OK though: > > Do not output commands to restore comments, even if the archive > contains them.
Fixed in the attached applied patch. -- Bruce Momjian <br...@momjian.us> https://momjian.us EDB https://enterprisedb.com When a patient asks the doctor, "Am I going to die?", he means "Am I going to die soon?"
diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml index 4d7c0464687..014f2792589 100644 --- a/doc/src/sgml/ref/pg_dumpall.sgml +++ b/doc/src/sgml/ref/pg_dumpall.sgml @@ -417,7 +417,7 @@ exclude database <replaceable class="parameter">PATTERN</replaceable> <term><option>--no-comments</option></term> <listitem> <para> - Do not dump comments. + Do not dump <command>COMMENT</command> commands. </para> </listitem> </varlistentry> diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index a8c141b689d..c30aafbe70d 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -1212,7 +1212,7 @@ help(const char *progname) " servers matching PATTERN\n")); printf(_(" --inserts dump data as INSERT commands, rather than COPY\n")); printf(_(" --load-via-partition-root load partitions via the root table\n")); - printf(_(" --no-comments do not dump comments\n")); + printf(_(" --no-comments do not dump comment commands\n")); printf(_(" --no-publications do not dump publications\n")); printf(_(" --no-security-labels do not dump security label assignments\n")); printf(_(" --no-subscriptions do not dump subscriptions\n")); diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index e3ad8fb2956..9a04e51c81a 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -662,7 +662,7 @@ help(void) printf(_(" --if-exists use IF EXISTS when dropping objects\n")); printf(_(" --inserts dump data as INSERT commands, rather than COPY\n")); printf(_(" --load-via-partition-root load partitions via the root table\n")); - printf(_(" --no-comments do not dump comments\n")); + printf(_(" --no-comments do not dump comment commands\n")); printf(_(" --no-publications do not dump publications\n")); printf(_(" --no-role-passwords do not dump passwords for roles\n")); printf(_(" --no-security-labels do not dump security label assignments\n")); diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c index f2c1020d053..10da7d27da8 100644 --- a/src/bin/pg_dump/pg_restore.c +++ b/src/bin/pg_dump/pg_restore.c @@ -484,7 +484,7 @@ usage(const char *progname) printf(_(" --filter=FILENAME restore or skip objects based on expressions\n" " in FILENAME\n")); printf(_(" --if-exists use IF EXISTS when dropping objects\n")); - printf(_(" --no-comments do not restore comments\n")); + printf(_(" --no-comments do not restore comment commands\n")); printf(_(" --no-data-for-failed-tables do not restore data of tables that could not be\n" " created\n")); printf(_(" --no-publications do not restore publications\n"));