From: Peter Eisentraut Date: Wed, 4 May 2011 17:56:52 +0000 (+0300) Subject: Message style cleanup X-Git-Tag: REL9_1_BETA2~170 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bff074b1ab0dfed7a7822dcc8942f877efa3b914;p=postgresql Message style cleanup --- diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index a5d9c2e652..b689abb116 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -118,23 +118,23 @@ xmalloc0(int size) static void usage(void) { - printf(_("%s takes base backups of running PostgreSQL servers\n\n"), + printf(_("%s takes a base backup of a running PostgreSQL server.\n\n"), progname); printf(_("Usage:\n")); printf(_(" %s [OPTION]...\n"), progname); printf(_("\nOptions controlling the output:\n")); - printf(_(" -D, --pgdata=directory receive base backup into directory\n")); - printf(_(" -F, --format=p|t output format (plain, tar)\n")); - printf(_(" -x, --xlog include required WAL files in backup\n")); - printf(_(" -Z, --compress=0-9 compress tar output\n")); + printf(_(" -D, --pgdata=DIRECTORY receive base backup into directory\n")); + printf(_(" -F, --format=p|t output format (plain, tar)\n")); + printf(_(" -x, --xlog include required WAL files in backup\n")); + printf(_(" -Z, --compress=0-9 compress tar output\n")); printf(_("\nGeneral options:\n")); printf(_(" -c, --checkpoint=fast|spread\n" - " set fast or spread checkpointing\n")); - printf(_(" -l, --label=label set backup label\n")); - printf(_(" -P, --progress show progress information\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")); + " set fast or spread checkpointing\n")); + printf(_(" -l, --label=LABEL set backup label\n")); + printf(_(" -P, --progress show progress information\n")); + printf(_(" -v, --verbose output verbose messages\n")); + printf(_(" --help show this help, then exit\n")); + printf(_(" --version output version information, then exit\n")); printf(_("\nConnection options:\n")); printf(_(" -h, --host=HOSTNAME database server host or socket directory\n")); printf(_(" -p, --port=PORT database server port number\n")); @@ -337,7 +337,7 @@ ReceiveTarFile(PGconn *conn, PGresult *res, int rownum) res = PQgetResult(conn); if (PQresultStatus(res) != PGRES_COPY_OUT) { - fprintf(stderr, _("%s: could not get COPY data stream: %s\n"), + fprintf(stderr, _("%s: could not get COPY data stream: %s"), progname, PQerrorMessage(conn)); disconnect_and_exit(1); } @@ -398,7 +398,7 @@ ReceiveTarFile(PGconn *conn, PGresult *res, int rownum) } else if (r == -2) { - fprintf(stderr, _("%s: could not read COPY data: %s\n"), + fprintf(stderr, _("%s: could not read COPY data: %s"), progname, PQerrorMessage(conn)); disconnect_and_exit(1); } @@ -467,7 +467,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) res = PQgetResult(conn); if (PQresultStatus(res) != PGRES_COPY_OUT) { - fprintf(stderr, _("%s: could not get COPY data stream: %s\n"), + fprintf(stderr, _("%s: could not get COPY data stream: %s"), progname, PQerrorMessage(conn)); disconnect_and_exit(1); } @@ -496,7 +496,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) } else if (r == -2) { - fprintf(stderr, _("%s: could not read COPY data: %s\n"), + fprintf(stderr, _("%s: could not read COPY data: %s"), progname, PQerrorMessage(conn)); disconnect_and_exit(1); } @@ -510,7 +510,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) */ if (r != 512) { - fprintf(stderr, _("%s: Invalid tar block header size: %i\n"), + fprintf(stderr, _("%s: invalid tar block header size: %i\n"), progname, r); disconnect_and_exit(1); } @@ -518,7 +518,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) if (sscanf(copybuf + 124, "%11o", ¤t_len_left) != 1) { - fprintf(stderr, _("%s: could not parse file size!\n"), + fprintf(stderr, _("%s: could not parse file size\n"), progname); disconnect_and_exit(1); } @@ -526,7 +526,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) /* Set permissions on the file */ if (sscanf(©buf[100], "%07o ", &filemode) != 1) { - fprintf(stderr, _("%s: could not parse file mode!\n"), + fprintf(stderr, _("%s: could not parse file mode\n"), progname); disconnect_and_exit(1); } @@ -581,7 +581,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) } else { - fprintf(stderr, _("%s: unknown link indicator \"%c\"\n"), + fprintf(stderr, _("%s: unrecognized link indicator \"%c\"\n"), progname, copybuf[156]); disconnect_and_exit(1); } @@ -659,7 +659,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) if (file != NULL) { - fprintf(stderr, _("%s: last file was never finished!\n"), progname); + fprintf(stderr, _("%s: last file was never finished\n"), progname); disconnect_and_exit(1); } @@ -740,7 +740,7 @@ GetConnection(void) if (PQstatus(tmpconn) != CONNECTION_OK) { - fprintf(stderr, _("%s: could not connect to server: %s\n"), + fprintf(stderr, _("%s: could not connect to server: %s"), progname, PQerrorMessage(tmpconn)); exit(1); } @@ -780,7 +780,7 @@ BaseBackup(void) if (PQsendQuery(conn, current_path) == 0) { - fprintf(stderr, _("%s: could not start base backup: %s\n"), + fprintf(stderr, _("%s: could not start base backup: %s"), progname, PQerrorMessage(conn)); disconnect_and_exit(1); } @@ -791,13 +791,13 @@ BaseBackup(void) res = PQgetResult(conn); if (PQresultStatus(res) != PGRES_TUPLES_OK) { - fprintf(stderr, _("%s: could not initiate base backup: %s\n"), + fprintf(stderr, _("%s: could not initiate base backup: %s"), progname, PQerrorMessage(conn)); disconnect_and_exit(1); } if (PQntuples(res) != 1) { - fprintf(stderr, _("%s: no start point returned from server.\n"), + fprintf(stderr, _("%s: no start point returned from server\n"), progname); disconnect_and_exit(1); } @@ -813,13 +813,13 @@ BaseBackup(void) res = PQgetResult(conn); if (PQresultStatus(res) != PGRES_TUPLES_OK) { - fprintf(stderr, _("%s: could not get backup header: %s\n"), + fprintf(stderr, _("%s: could not get backup header: %s"), progname, PQerrorMessage(conn)); disconnect_and_exit(1); } if (PQntuples(res) < 1) { - fprintf(stderr, _("%s: no data returned from server.\n"), progname); + fprintf(stderr, _("%s: no data returned from server\n"), progname); disconnect_and_exit(1); } @@ -847,7 +847,7 @@ BaseBackup(void) */ if (format == 't' && strcmp(basedir, "-") == 0 && PQntuples(res) > 1) { - fprintf(stderr, _("%s: can only write single tablespace to stdout, database has %i.\n"), + fprintf(stderr, _("%s: can only write single tablespace to stdout, database has %i\n"), progname, PQntuples(res)); disconnect_and_exit(1); } @@ -876,13 +876,13 @@ BaseBackup(void) res = PQgetResult(conn); if (PQresultStatus(res) != PGRES_TUPLES_OK) { - fprintf(stderr, _("%s: could not get end xlog position from server.\n"), + fprintf(stderr, _("%s: could not get end xlog position from server\n"), progname); disconnect_and_exit(1); } if (PQntuples(res) != 1) { - fprintf(stderr, _("%s: no end point returned from server.\n"), + fprintf(stderr, _("%s: no end point returned from server\n"), progname); disconnect_and_exit(1); } @@ -894,7 +894,7 @@ BaseBackup(void) res = PQgetResult(conn); if (PQresultStatus(res) != PGRES_COMMAND_OK) { - fprintf(stderr, _("%s: final receive failed: %s\n"), + fprintf(stderr, _("%s: final receive failed: %s"), progname, PQerrorMessage(conn)); disconnect_and_exit(1); } @@ -905,7 +905,7 @@ BaseBackup(void) PQfinish(conn); if (verbose) - fprintf(stderr, "%s: base backup completed.\n", progname); + fprintf(stderr, "%s: base backup completed\n", progname); }