BUG #18952: pg_restore --help and document have strange description: Dump something

PG Bug reporting form <noreply@postgresql.org>

From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: harukat@sraoss.co.jp
Date: 2025-06-10T07:35:00Z
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18952
Logged by:          TAKATSUKA Haruka
Email address:      harukat@sraoss.co.jp
PostgreSQL version: 18beta1
Operating system:   any
Description:        

pg_restore --help has strange description like "Dump .....":
[dbhost]$ LANG=C pg_restore --help
pg_restore restores PostgreSQL databases from archives created by pg_dump or
pg_dumpall.
Usage:
  pg_restore [OPTION]... [FILE]
(snip)
  --with-data                  dump the data
  --with-schema                dump the schema
  --with-statistics            dump the statistics
Connection options:
  -h, --host=HOSTNAME      database server host or socket directory
(snip)
https://www.postgresql.org/docs/18/app-pgrestore.html also have the
following description.
--with-data
    Dump data. This is the default.
--with-schema
    Dump schema (data definitions). This is the default.
--with-statistics
    Dump statistics. This is the default.

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. pg_restore: Fix wrong descriptions of --with-{schema,data,statistics} options.

  2. Add pg_dump --with-{schema|data|statistics} options.