From 7d754961f799634128fb2d77632e2b53b736ae21 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 12 Jun 2012 00:55:27 +0300 Subject: [PATCH] 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. --- doc/src/sgml/ref/pg_receivexlog.sgml | 2 +- src/bin/pg_basebackup/pg_receivexlog.c | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/doc/src/sgml/ref/pg_receivexlog.sgml b/doc/src/sgml/ref/pg_receivexlog.sgml index b1eee1f20b..5eefefbe87 100644 --- a/doc/src/sgml/ref/pg_receivexlog.sgml +++ b/doc/src/sgml/ref/pg_receivexlog.sgml @@ -78,7 +78,7 @@ PostgreSQL documentation - + Directory to write the output to. diff --git a/src/bin/pg_basebackup/pg_receivexlog.c b/src/bin/pg_basebackup/pg_receivexlog.c index 1acb7ccb56..faa30b2bf0 100644 --- a/src/bin/pg_basebackup/pg_receivexlog.c +++ b/src/bin/pg_basebackup/pg_receivexlog.c @@ -52,17 +52,16 @@ static bool stop_streaming(XLogRecPtr segendpos, uint32 timeline, bool segment_f static void usage(void) { - printf(_("%s receives PostgreSQL streaming transaction logs\n\n"), + printf(_("%s receives PostgreSQL streaming transaction logs.\n\n"), progname); printf(_("Usage:\n")); printf(_(" %s [OPTION]...\n"), progname); - printf(_("\nOptions controlling the output:\n")); - printf(_(" -D, --dir=directory receive xlog files into this directory\n")); - printf(_("\nGeneral options:\n")); - printf(_(" -n, --noloop do not loop on connection lost\n")); - printf(_(" -v, --verbose output verbose messages\n")); - printf(_(" -?, --help show this help, then exit\n")); - printf(_(" -V, --version output version information, then exit\n")); + printf(_("\nOptions:\n")); + printf(_(" -D, --directory=DIR receive transaction log files into this directory\n")); + printf(_(" -n, --noloop do not loop on connection lost\n")); + printf(_(" -v, --verbose output verbose messages\n")); + printf(_(" -?, --help show this help, then exit\n")); + printf(_(" -V, --version output version information, then exit\n")); printf(_("\nConnection options:\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")); @@ -293,7 +292,7 @@ main(int argc, char **argv) static struct option long_options[] = { {"help", no_argument, NULL, '?'}, {"version", no_argument, NULL, 'V'}, - {"dir", required_argument, NULL, 'D'}, + {"directory", required_argument, NULL, 'D'}, {"host", required_argument, NULL, 'h'}, {"port", required_argument, NULL, 'p'}, {"username", required_argument, NULL, 'U'}, -- 2.40.0