mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
pg_receivexlog: Rename option --dir to --directory
getopt_long() allows abbreviating long options, so we might as well give the option the full name, and users can abbreviate it how they like. Do some general polishing of the --help output at the same time.
This commit is contained in:
@ -78,7 +78,7 @@ PostgreSQL documentation
|
|||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-D <replaceable class="parameter">directory</replaceable></option></term>
|
<term><option>-D <replaceable class="parameter">directory</replaceable></option></term>
|
||||||
<term><option>--dir=<replaceable class="parameter">directory</replaceable></option></term>
|
<term><option>--directory=<replaceable class="parameter">directory</replaceable></option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Directory to write the output to.
|
Directory to write the output to.
|
||||||
|
@ -52,17 +52,16 @@ static bool stop_streaming(XLogRecPtr segendpos, uint32 timeline, bool segment_f
|
|||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
printf(_("%s receives PostgreSQL streaming transaction logs\n\n"),
|
printf(_("%s receives PostgreSQL streaming transaction logs.\n\n"),
|
||||||
progname);
|
progname);
|
||||||
printf(_("Usage:\n"));
|
printf(_("Usage:\n"));
|
||||||
printf(_(" %s [OPTION]...\n"), progname);
|
printf(_(" %s [OPTION]...\n"), progname);
|
||||||
printf(_("\nOptions controlling the output:\n"));
|
printf(_("\nOptions:\n"));
|
||||||
printf(_(" -D, --dir=directory receive xlog files into this directory\n"));
|
printf(_(" -D, --directory=DIR receive transaction log files into this directory\n"));
|
||||||
printf(_("\nGeneral options:\n"));
|
printf(_(" -n, --noloop do not loop on connection lost\n"));
|
||||||
printf(_(" -n, --noloop do not loop on connection lost\n"));
|
printf(_(" -v, --verbose output verbose messages\n"));
|
||||||
printf(_(" -v, --verbose output verbose messages\n"));
|
printf(_(" -?, --help show this help, then exit\n"));
|
||||||
printf(_(" -?, --help show this help, then exit\n"));
|
printf(_(" -V, --version output version information, then exit\n"));
|
||||||
printf(_(" -V, --version output version information, then exit\n"));
|
|
||||||
printf(_("\nConnection options:\n"));
|
printf(_("\nConnection options:\n"));
|
||||||
printf(_(" -s, --statusint=INTERVAL time between status packets sent to server (in seconds)\n"));
|
printf(_(" -s, --statusint=INTERVAL time between status packets sent to server (in seconds)\n"));
|
||||||
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
|
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
|
||||||
@ -293,7 +292,7 @@ main(int argc, char **argv)
|
|||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{"help", no_argument, NULL, '?'},
|
{"help", no_argument, NULL, '?'},
|
||||||
{"version", no_argument, NULL, 'V'},
|
{"version", no_argument, NULL, 'V'},
|
||||||
{"dir", required_argument, NULL, 'D'},
|
{"directory", required_argument, NULL, 'D'},
|
||||||
{"host", required_argument, NULL, 'h'},
|
{"host", required_argument, NULL, 'h'},
|
||||||
{"port", required_argument, NULL, 'p'},
|
{"port", required_argument, NULL, 'p'},
|
||||||
{"username", required_argument, NULL, 'U'},
|
{"username", required_argument, NULL, 'U'},
|
||||||
|
Reference in New Issue
Block a user