Refer to bug report address by symbol rather than hardcoding
authorPeter Eisentraut <[email protected]>
Fri, 28 Feb 2020 07:54:49 +0000 (08:54 +0100)
committerPeter Eisentraut <[email protected]>
Fri, 28 Feb 2020 12:12:21 +0000 (13:12 +0100)
Use the PACKAGE_BUGREPORT macro that is created by Autoconf for
referring to the bug reporting address rather than hardcoding it
everywhere.  This makes it easier to change the address and it reduces
translation work.

Reviewed-by: Daniel Gustafsson <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/8d389c5f-7fb5-8e48-9a4a-68cec44786fa%402ndquadrant.com

36 files changed:
configure.in
contrib/oid2name/oid2name.c
contrib/pg_standby/pg_standby.c
contrib/vacuumlo/vacuumlo.c
src/backend/main/main.c
src/backend/postmaster/postmaster.c
src/bin/initdb/initdb.c
src/bin/pg_archivecleanup/pg_archivecleanup.c
src/bin/pg_basebackup/pg_basebackup.c
src/bin/pg_basebackup/pg_receivewal.c
src/bin/pg_basebackup/pg_recvlogical.c
src/bin/pg_checksums/pg_checksums.c
src/bin/pg_config/pg_config.c
src/bin/pg_controldata/pg_controldata.c
src/bin/pg_ctl/pg_ctl.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_dump/pg_restore.c
src/bin/pg_resetwal/pg_resetwal.c
src/bin/pg_rewind/pg_rewind.c
src/bin/pg_upgrade/option.c
src/bin/pg_waldump/pg_waldump.c
src/bin/pgbench/pgbench.c
src/bin/psql/help.c
src/bin/scripts/clusterdb.c
src/bin/scripts/createdb.c
src/bin/scripts/createuser.c
src/bin/scripts/dropdb.c
src/bin/scripts/dropuser.c
src/bin/scripts/pg_isready.c
src/bin/scripts/reindexdb.c
src/bin/scripts/vacuumdb.c
src/interfaces/ecpg/preproc/ecpg.c
src/interfaces/ecpg/preproc/pgc.l
src/interfaces/ecpg/preproc/type.c
src/test/regress/pg_regress.c

index 0b0a871298e389c9dc57874af780cb4908aca066..a2db1884d3cf6df258bce05faaf1bde5bb29a9f6 100644 (file)
@@ -79,7 +79,7 @@ PostgreSQL has apparently not been ported to your platform yet.
 To try a manual configuration, look into the src/template directory
 for a similar platform and use the '--with-template=' option.
 
-Please also contact <[email protected]> to see about
+Please also contact <]AC_PACKAGE_BUGREPORT[> to see about
 rectifying this.  Include the above 'checking host system type...'
 line.
 *******************************************************************
index 2b53dac64aede5a84a14da68d1e12ee23fa90083..e67f71d97d556b9c1b96b98c2ec204d7aaf832f3 100644 (file)
@@ -219,8 +219,8 @@ help(const char *progname)
           "  -p, --port=PORT            database server port number\n"
           "  -U, --username=USERNAME    connect as specified database user\n"
           "\nThe default action is to show all database OIDs.\n\n"
-          "Report bugs to <[email protected]>.\n",
-          progname, progname);
+          "Report bugs to <%s>.\n",
+          progname, progname, PACKAGE_BUGREPORT);
 }
 
 /*
index 9784d7aef38928d408f608dc446fbf212d3eecaf..15604da76508cccc4d2c345b58551e33a7e30c37 100644 (file)
@@ -612,7 +612,7 @@ usage(void)
           "  restore_command = 'pg_standby [OPTION]... ARCHIVELOCATION %%f %%p %%r'\n"
           "e.g.\n"
           "  restore_command = 'pg_standby /mnt/server/archiverdir %%f %%p %%r'\n");
-   printf("\nReport bugs to <[email protected]>.\n");
+   printf("\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT);
 }
 
 #ifndef WIN32
index 8dd423831799f377a14a5e2d427115b683c37e8d..b8aa295665962e69a4eed02c7c2d0101d3e6ad5d 100644 (file)
@@ -436,7 +436,7 @@ usage(const char *progname)
    printf("  -w, --no-password         never prompt for password\n");
    printf("  -W, --password            force password prompt\n");
    printf("\n");
-   printf("Report bugs to <[email protected]>.\n");
+   printf("Report bugs to <%s>.\n", PACKAGE_BUGREPORT);
 }
 
 
index c0d1fcde065e2b93a5368f29f72ec7f1439d00e4..1bb4ae03b8a2c872dcf908e5e76c5f2b77577455 100644 (file)
@@ -359,7 +359,7 @@ help(const char *progname)
    printf(_("\nPlease read the documentation for the complete list of run-time\n"
             "configuration settings and how to set them on the command line or in\n"
             "the configuration file.\n\n"
-            "Report bugs to <[email protected]>.\n"));
+            "Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 
index cd61665eea3c2e3ad8faf42557f9f75fffb6267e..55187eb910d20d8aba9d65749c65238cea9f9423 100644 (file)
@@ -5141,7 +5141,7 @@ ExitPostmaster(int status)
        ereport(LOG,
                (errcode(ERRCODE_INTERNAL_ERROR),
                 errmsg_internal("postmaster became multithreaded"),
-                errdetail("Please report this to <[email protected]>.")));
+                errdetail("Please report this to <%s>.", PACKAGE_BUGREPORT)));
 #endif
 
    /* should cleanup shared memory and kill all backends */
index 53029733793a762ab508a71345d888de96f38be2..12dd83c230defd612f6ab4253986631d9ec51fe2 100644 (file)
@@ -2322,7 +2322,7 @@ usage(const char *progname)
    printf(_("  -?, --help                show this help, then exit\n"));
    printf(_("\nIf the data directory is not specified, the environment variable PGDATA\n"
             "is used.\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 static void
index 2917d7fc6396ed4e040cbbb4be005a2ce40dd890..aef99eba30ece9942c3ea54429eb25891ea01cf7 100644 (file)
@@ -269,7 +269,7 @@ usage(void)
             "Or for use as a standalone archive cleaner:\n"
             "e.g.\n"
             "  pg_archivecleanup /mnt/server/archiverdir 000000010000000000000010.00000020.backup\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 /*------------ MAIN ----------------------------------------*/
index 2551cf38c91d8064d03c28598011ff8e760fe135..b75b6d4da2534ebf8d583a6ef66447440a5b5f4c 100644 (file)
@@ -396,7 +396,7 @@ usage(void)
    printf(_("  -U, --username=NAME    connect as specified database user\n"));
    printf(_("  -w, --no-password      never prompt for password\n"));
    printf(_("  -W, --password         force password prompt (should happen automatically)\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 
index f5acf12ae7d212fcecf00419d518073a2617197e..808078e6b73df8e46614f100afd7a009bf6f4f71 100644 (file)
@@ -102,7 +102,7 @@ usage(void)
    printf(_("\nOptional actions:\n"));
    printf(_("      --create-slot      create a new replication slot (for the slot's name see --slot)\n"));
    printf(_("      --drop-slot        drop the replication slot (for the slot's name see --slot)\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 static bool
index c9c4eaa92863a37baa2eb8e0d3bfa8bb220858c5..ef2d806fb39451878199f2ddd7a44703298bf228 100644 (file)
@@ -103,7 +103,7 @@ usage(void)
    printf(_("  -U, --username=NAME    connect as specified database user\n"));
    printf(_("  -w, --no-password      never prompt for password\n"));
    printf(_("  -W, --password         force password prompt (should happen automatically)\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 /*
index eb179500960691fd1b89c74264d151bfbe5a2686..b457866048401f81553c0493fae504f88fdb4580 100644 (file)
@@ -88,7 +88,7 @@ usage(void)
    printf(_("  -?, --help               show this help, then exit\n"));
    printf(_("\nIf no data directory (DATADIR) is specified, "
             "the environment variable PGDATA\nis used.\n\n"));
-   printf(_("Report bugs to <[email protected]>.\n"));
+   printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 /*
index 8ed4915fee6e6a1e47f429b2ff5209710e45a628..9ff56e2fca4ff2ecf14d33191712c487003420f8 100644 (file)
@@ -102,7 +102,7 @@ help(void)
    printf(_("  --version             show the PostgreSQL version\n"));
    printf(_("  -?, --help            show this help, then exit\n"));
    printf(_("\nWith no arguments, all known items are shown.\n\n"));
-   printf(_("Report bugs to <[email protected]>.\n"));
+   printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 static void
index 19e21ab4912afecc9d83e24aa9468f0c97c05e59..a53794b9e6655093dd2415b1818612d7b279ea98 100644 (file)
@@ -41,7 +41,7 @@ usage(const char *progname)
    printf(_("  -?, --help             show this help, then exit\n"));
    printf(_("\nIf no data directory (DATADIR) is specified, "
             "the environment variable PGDATA\nis used.\n\n"));
-   printf(_("Report bugs to <[email protected]>.\n"));
+   printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 
index 3668f35b2224098e602b5d3eeaeb680314b1ad27..72f095fd0d68bbac6c647fe3a48febf758534323 100644 (file)
@@ -2095,7 +2095,7 @@ do_help(void)
    printf(_("  demand     start service on demand\n"));
 #endif
 
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 
index d92a6626a591c1b2ce8e3fb441d1762c57a8a994..d368f00d1df3838e98cd9de4efa42adf2c97d089 100644 (file)
@@ -1047,7 +1047,7 @@ help(const char *progname)
 
    printf(_("\nIf no database name is supplied, then the PGDATABASE environment\n"
             "variable value is used.\n\n"));
-   printf(_("Report bugs to <[email protected]>.\n"));
+   printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 static void
index 26ded9fe0e70b339e7c529e6011ed54a46ec28ea..de311b6ad10e07d1ccd2cb86a164f037674c03c4 100644 (file)
@@ -670,7 +670,7 @@ help(void)
 
    printf(_("\nIf -f/--file is not used, then the SQL script will be written to the standard\n"
             "output.\n\n"));
-   printf(_("Report bugs to <[email protected]>.\n"));
+   printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 
index d1a36b1495fe4b70bf4044f2ac9ca674c72e1b09..3749454b977429f198162825545676366f69f85b 100644 (file)
@@ -519,5 +519,5 @@ usage(const char *progname)
             "The options -I, -n, -N, -P, -t, -T, and --section can be combined and specified\n"
             "multiple times to select multiple objects.\n"));
    printf(_("\nIf no input file name is supplied, then standard input is used.\n\n"));
-   printf(_("Report bugs to <[email protected]>.\n"));
+   printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
index c9edeb54d33e539fd13881a1ed01de6c76b2bde3..1f043c918fbd34bc792b1708952946004f2f4301 100644 (file)
@@ -1223,5 +1223,5 @@ usage(void)
    printf(_("  -x, --next-transaction-id=XID  set next transaction ID\n"));
    printf(_("      --wal-segsize=SIZE         size of WAL segments, in megabytes\n"));
    printf(_("  -?, --help                     show this help, then exit\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
index c6d00bb0ab7d7ab73ebdffb38a25d4f3121a1409..2d9cf6075ab39f4ec6cf5a19b947ce39d74eb7c6 100644 (file)
@@ -87,7 +87,7 @@ usage(const char *progname)
    printf(_("      --debug                    write a lot of debug messages\n"));
    printf(_("  -V, --version                  output version information, then exit\n"));
    printf(_("  -?, --help                     show this help, then exit\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 
index eed70fff4f00c20f3f67f773739832cc08a9c008..c753a75fa03a290e38a4cc9990aa0f466be24b07 100644 (file)
@@ -336,7 +336,7 @@ usage(void)
             "  C:\\> set PGBINNEW=newCluster/bin\n"
             "  C:\\> pg_upgrade\n"));
 #endif
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 
index 83202b5b876be70cb073126ff00dfaa309508059..906f7e1f089b28ee299a453cdbc726eb761e6839 100644 (file)
@@ -730,7 +730,7 @@ usage(void)
    printf(_("  -z, --stats[=record]   show statistics instead of records\n"
             "                         (optionally, show per-record statistics)\n"));
    printf(_("  -?, --help             show this help, then exit\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 int
index 39c1a243d53ac229b54b8cbfb79eff199eb3efaf..978fca0f47195edde96f53d05c6de53530b2db29 100644 (file)
@@ -681,8 +681,8 @@ usage(void)
           "  -V, --version            output version information, then exit\n"
           "  -?, --help               show this help, then exit\n"
           "\n"
-          "Report bugs to <[email protected]>.\n",
-          progname, progname);
+          "Report bugs to <%s>.\n",
+          progname, progname, PACKAGE_BUGREPORT);
 }
 
 /* return whether str matches "^\s*[-+]?[0-9]+$" */
index 66b47d98cbe8eb29bc9d4ef16075358ba8f6f01f..777d54f085863cac69e0f35e9acaa0899d0cb3ff 100644 (file)
@@ -144,7 +144,7 @@ usage(unsigned short int pager)
    fprintf(output, _("\nFor more information, type \"\\?\" (for internal commands) or \"\\help\" (for SQL\n"
                      "commands) from within psql, or consult the psql section in the PostgreSQL\n"
                      "documentation.\n\n"));
-   fprintf(output, _("Report bugs to <[email protected]>.\n"));
+   fprintf(output, _("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 
    ClosePager(output);
 }
index f86769d0701d85de2ff660a250460025e7911ce9..d9761b39b26d3b997c8b7c5882d0f97f0729afff 100644 (file)
@@ -291,5 +291,5 @@ help(const char *progname)
    printf(_("  -W, --password            force password prompt\n"));
    printf(_("  --maintenance-db=DBNAME   alternate maintenance database\n"));
    printf(_("\nRead the description of the SQL command CLUSTER for details.\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
index 4733af8e97ba28f8faf3966134bd31d644f1e998..9fd46a679aa88d9f26cca08eebfab2f41d353fae 100644 (file)
@@ -277,5 +277,5 @@ help(const char *progname)
    printf(_("  -W, --password               force password prompt\n"));
    printf(_("  --maintenance-db=DBNAME      alternate maintenance database\n"));
    printf(_("\nBy default, a database with the same name as the current user is created.\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
index e781ecab2fb6d5e0477537fb42a9015de48d5f59..a658701dd2461e564234ec9dee18f291ca67bf6e 100644 (file)
@@ -375,5 +375,5 @@ help(const char *progname)
    printf(_("  -U, --username=USERNAME   user name to connect as (not the one to create)\n"));
    printf(_("  -w, --no-password         never prompt for password\n"));
    printf(_("  -W, --password            force password prompt\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
index 20d0215ce9d361a57ac634f9e6099f21c86a617f..1b26f9e6de2515fe862e65daf64eebdd50166a3f 100644 (file)
@@ -177,5 +177,5 @@ help(const char *progname)
    printf(_("  -w, --no-password         never prompt for password\n"));
    printf(_("  -W, --password            force password prompt\n"));
    printf(_("  --maintenance-db=DBNAME   alternate maintenance database\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
index c5200db0a454a1f15fe4742e4180be91b27a0bbf..a81d4868c4ad5817ead6c8e847181b7fc2d94aa0 100644 (file)
@@ -175,5 +175,5 @@ help(const char *progname)
    printf(_("  -U, --username=USERNAME   user name to connect as (not the one to drop)\n"));
    printf(_("  -w, --no-password         never prompt for password\n"));
    printf(_("  -W, --password            force password prompt\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
index d9af2250b91003a7a62c79a78d1785c12185c594..ead88a9b5a56a879177e430523ce626a14e88aa0 100644 (file)
@@ -235,5 +235,5 @@ help(const char *progname)
    printf(_("  -p, --port=PORT          database server port\n"));
    printf(_("  -t, --timeout=SECS       seconds to wait when attempting connection, 0 disables (default: %s)\n"), DEFAULT_CONNECT_TIMEOUT);
    printf(_("  -U, --username=USERNAME  user name to connect as\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
index da9faae56278ee2ff1bcce4792cc41c91209ea0a..f680c0d6bdd140c6edda60a29e26b48afd551c3f 100644 (file)
@@ -774,5 +774,5 @@ help(const char *progname)
    printf(_("  -W, --password            force password prompt\n"));
    printf(_("  --maintenance-db=DBNAME   alternate maintenance database\n"));
    printf(_("\nRead the description of the SQL command REINDEX for details.\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
index 0560f6304fff4fdb61697ec9c4e170963fab6626..d3952f4150664172736ab41dcb697f8c1bd82538 100644 (file)
@@ -949,5 +949,5 @@ help(const char *progname)
    printf(_("  -W, --password            force password prompt\n"));
    printf(_("  --maintenance-db=DBNAME   alternate maintenance database\n"));
    printf(_("\nRead the description of the SQL command VACUUM for details.\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
index d7a7c1760c6d2434d2d2c8acb4f9073858b3030d..a8c93d4934525e2f4c2cbe8cd223dc5b180b27bb 100644 (file)
@@ -58,7 +58,7 @@ help(const char *progname)
    printf(_("  -?, --help     show this help, then exit\n"));
    printf(_("\nIf no output file is specified, the name is formed by adding .c to the\n"
             "input file name, after stripping off .pgc if present.\n"));
-   printf(_("\nReport bugs to <[email protected]>.\n"));
+   printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 static void
index 0e8621a05e2acca092ae874fc1f579878ce43d3a..f6052798fd54d5dbc112673cee167a6f3e475617 100644 (file)
@@ -1429,7 +1429,7 @@ cppline           {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
                    }
                }
 
-<INITIAL>{other}|\n    { mmfatal(PARSE_ERROR, "internal error: unreachable state; please report this to <[email protected]>"); }
+<INITIAL>{other}|\n    { mmfatal(PARSE_ERROR, "internal error: unreachable state; please report this to <%s>", PACKAGE_BUGREPORT); }
 
 %%
 
index 6a71766ccf3ada5b0c6ad50a27c8e2ffa9ac7f93..d4b4da5ffcda34fda463fa3d36b5078c72912fc6 100644 (file)
@@ -301,7 +301,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype *type, const int brac
                    break;
                default:
                    if (!IS_SIMPLE_TYPE(type->u.element->type))
-                       base_yyerror("internal error: unknown datatype, please report this to <[email protected]>");
+                       base_yyerror("internal error: unknown datatype, please report this to <" PACKAGE_BUGREPORT ">");
 
                    ECPGdump_a_simple(o, name,
                                      type->u.element->type,
@@ -672,7 +672,7 @@ ECPGfree_type(struct ECPGtype *type)
                        break;
                    default:
                        if (!IS_SIMPLE_TYPE(type->u.element->type))
-                           base_yyerror("internal error: unknown datatype, please report this to <[email protected]>");
+                           base_yyerror("internal error: unknown datatype, please report this to <" PACKAGE_BUGREPORT ">");
 
                        free(type->u.element);
                }
index 9a4e52bc7b241255d333aa6a5970178d4f3f66dd..9270977393d0f015b2420d14bd3fc6600a06edec 100644 (file)
@@ -2071,7 +2071,7 @@ help(void)
    printf(_("The exit status is 0 if all tests passed, 1 if some tests failed, and 2\n"));
    printf(_("if the tests could not be run for some reason.\n"));
    printf(_("\n"));
-   printf(_("Report bugs to <[email protected]>.\n"));
+   printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
 }
 
 int