Fix help option of contrib/oid2name

From: Tatsuro Yamada <yamada(dot)tatsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Fix help option of contrib/oid2name
Date: 2018-08-16 09:04:00
Message-ID: c7e7f25c-1747-cd0f-9335-390bc97b2db5@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Hi,

Almost all client applications and extensions will show "Options" and
"Connection options" sections when running with help option (--help).
However, "oid2name" was different, there is only the Options section.
For example,

$ vacuumlo --help
vacuumlo removes unreferenced large objects from databases.

Usage:
vacuumlo [OPTION]... DBNAME...

Options:
-l LIMIT commit after removing each LIMIT large objects
-n don't remove large objects, just show what would be done
-v write a lot of progress messages
-V, --version output version information, then exit
-?, --help show this help, then exit

Connection options:
-h HOSTNAME database server host or socket directory
-p PORT database server port
-U USERNAME user name to connect as
-w never prompt for password
-W force password prompt

$ oid2name --help
oid2name helps examining the file structure used by PostgreSQL.

Usage:
oid2name [OPTION]...

Options:
-d DBNAME database to connect to
-f FILENODE show info for table with given file node
-H HOSTNAME database server host or socket directory
-i show indexes and sequences too
-o OID show info for table with given OID
-p PORT database server port number
-q quiet (don't show headers)
-s show all tablespaces
-S show system objects too
-t TABLE show info for named table
-U NAME connect as specified database user
-V, --version output version information, then exit
-x extended (show additional columns)
-?, --help show this help, then exit

Above oid2name's "-d, -H, -p and -U" options are related to Connection
Options. So, it would be beter to write it in Connection options.
For consistency, attached patch divides the Options section of oid2name
into two sections, Options and Connection options.

Regards,
Tatsuro Yamada
NTT Open Source Software Center

Attachment Content-Type Size
fix_oid2name_help_option.patch text/x-patch 1.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2018-08-16 10:40:42 Re: Fix help option of contrib/oid2name
Previous Message Andres Freund 2018-08-16 08:41:34 Re: C99 compliance for src/port/snprintf.c