Skip to content

Commit 7d75496

Browse files
committed
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.
1 parent 3595a71 commit 7d75496

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

doc/src/sgml/ref/pg_receivexlog.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ PostgreSQL documentation
7878
<variablelist>
7979
<varlistentry>
8080
<term><option>-D <replaceable class="parameter">directory</replaceable></option></term>
81-
<term><option>--dir=<replaceable class="parameter">directory</replaceable></option></term>
81+
<term><option>--directory=<replaceable class="parameter">directory</replaceable></option></term>
8282
<listitem>
8383
<para>
8484
Directory to write the output to.

src/bin/pg_basebackup/pg_receivexlog.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,16 @@ static bool stop_streaming(XLogRecPtr segendpos, uint32 timeline, bool segment_f
5252
static void
5353
usage(void)
5454
{
55-
printf(_("%s receives PostgreSQL streaming transaction logs\n\n"),
55+
printf(_("%s receives PostgreSQL streaming transaction logs.\n\n"),
5656
progname);
5757
printf(_("Usage:\n"));
5858
printf(_(" %s [OPTION]...\n"), progname);
59-
printf(_("\nOptions controlling the output:\n"));
60-
printf(_(" -D, --dir=directory receive xlog files into this directory\n"));
61-
printf(_("\nGeneral options:\n"));
62-
printf(_(" -n, --noloop do not loop on connection lost\n"));
63-
printf(_(" -v, --verbose output verbose messages\n"));
64-
printf(_(" -?, --help show this help, then exit\n"));
65-
printf(_(" -V, --version output version information, then exit\n"));
59+
printf(_("\nOptions:\n"));
60+
printf(_(" -D, --directory=DIR receive transaction log files into this directory\n"));
61+
printf(_(" -n, --noloop do not loop on connection lost\n"));
62+
printf(_(" -v, --verbose output verbose messages\n"));
63+
printf(_(" -?, --help show this help, then exit\n"));
64+
printf(_(" -V, --version output version information, then exit\n"));
6665
printf(_("\nConnection options:\n"));
6766
printf(_(" -s, --statusint=INTERVAL time between status packets sent to server (in seconds)\n"));
6867
printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
@@ -293,7 +292,7 @@ main(int argc, char **argv)
293292
static struct option long_options[] = {
294293
{"help", no_argument, NULL, '?'},
295294
{"version", no_argument, NULL, 'V'},
296-
{"dir", required_argument, NULL, 'D'},
295+
{"directory", required_argument, NULL, 'D'},
297296
{"host", required_argument, NULL, 'h'},
298297
{"port", required_argument, NULL, 'p'},
299298
{"username", required_argument, NULL, 'U'},

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