@@ -240,13 +240,13 @@ parseCommandLine(int argc, char *argv[])
240240
241241 /* Get values from env if not already set */
242242 check_required_directory (& old_cluster .bindir , NULL , "PGBINOLD" , "-b" ,
243- "old cluster binaries reside" );
243+ _ ( "old cluster binaries reside" ) );
244244 check_required_directory (& new_cluster .bindir , NULL , "PGBINNEW" , "-B" ,
245- "new cluster binaries reside" );
245+ _ ( "new cluster binaries reside" ) );
246246 check_required_directory (& old_cluster .pgdata , & old_cluster .pgconfig ,
247- "PGDATAOLD" , "-d" , "old cluster data resides" );
247+ "PGDATAOLD" , "-d" , _ ( "old cluster data resides" ) );
248248 check_required_directory (& new_cluster .pgdata , & new_cluster .pgconfig ,
249- "PGDATANEW" , "-D" , "new cluster data resides" );
249+ "PGDATANEW" , "-D" , _ ( "new cluster data resides" ) );
250250
251251#ifdef WIN32
252252
@@ -275,56 +275,53 @@ parseCommandLine(int argc, char *argv[])
275275static void
276276usage (void )
277277{
278- printf (_ ("pg_upgrade upgrades a PostgreSQL cluster to a different major version.\n\
279- \nUsage:\n\
280- pg_upgrade [OPTION]...\n\
281- \n\
282- Options:\n\
283- -b, --old-bindir=BINDIR old cluster executable directory\n\
284- -B, --new-bindir=BINDIR new cluster executable directory\n\
285- -c, --check check clusters only, don't change any data\n\
286- -d, --old-datadir=DATADIR old cluster data directory\n\
287- -D, --new-datadir=DATADIR new cluster data directory\n\
288- -j, --jobs number of simultaneous processes or threads to use\n\
289- -k, --link link instead of copying files to new cluster\n\
290- -o, --old-options=OPTIONS old cluster options to pass to the server\n\
291- -O, --new-options=OPTIONS new cluster options to pass to the server\n\
292- -p, --old-port=PORT old cluster port number (default %d)\n\
293- -P, --new-port=PORT new cluster port number (default %d)\n\
294- -r, --retain retain SQL and log files after success\n\
295- -U, --username=NAME cluster superuser (default \"%s\")\n\
296- -v, --verbose enable verbose internal logging\n\
297- -V, --version display version information, then exit\n\
298- -?, --help show this help, then exit\n\
299- \n\
300- Before running pg_upgrade you must:\n\
301- create a new database cluster (using the new version of initdb)\n\
302- shutdown the postmaster servicing the old cluster\n\
303- shutdown the postmaster servicing the new cluster\n\
304- \n\
305- When you run pg_upgrade, you must provide the following information:\n\
306- the data directory for the old cluster (-d DATADIR)\n\
307- the data directory for the new cluster (-D DATADIR)\n\
308- the \"bin\" directory for the old version (-b BINDIR)\n\
309- the \"bin\" directory for the new version (-B BINDIR)\n\
310- \n\
311- For example:\n\
312- pg_upgrade -d oldCluster/data -D newCluster/data -b oldCluster/bin -B newCluster/bin\n\
313- or\n" ), old_cluster .port , new_cluster .port , os_info .user );
278+ printf (_ ("pg_upgrade upgrades a PostgreSQL cluster to a different major version.\n\n" ));
279+ printf (_ ("Usage:\n" ));
280+ printf (_ (" pg_upgrade [OPTION]...\n\n" ));
281+ printf (_ ("Options:\n" ));
282+ printf (_ (" -b, --old-bindir=BINDIR old cluster executable directory\n" ));
283+ printf (_ (" -B, --new-bindir=BINDIR new cluster executable directory\n" ));
284+ printf (_ (" -c, --check check clusters only, don't change any data\n" ));
285+ printf (_ (" -d, --old-datadir=DATADIR old cluster data directory\n" ));
286+ printf (_ (" -D, --new-datadir=DATADIR new cluster data directory\n" ));
287+ printf (_ (" -j, --jobs number of simultaneous processes or threads to use\n" ));
288+ printf (_ (" -k, --link link instead of copying files to new cluster\n" ));
289+ printf (_ (" -o, --old-options=OPTIONS old cluster options to pass to the server\n" ));
290+ printf (_ (" -O, --new-options=OPTIONS new cluster options to pass to the server\n" ));
291+ printf (_ (" -p, --old-port=PORT old cluster port number (default %d)\n" ), old_cluster .port );
292+ printf (_ (" -P, --new-port=PORT new cluster port number (default %d)\n" ), new_cluster .port );
293+ printf (_ (" -r, --retain retain SQL and log files after success\n" ));
294+ printf (_ (" -U, --username=NAME cluster superuser (default \"%s\")\n" ), os_info .user );
295+ printf (_ (" -v, --verbose enable verbose internal logging\n" ));
296+ printf (_ (" -V, --version display version information, then exit\n" ));
297+ printf (_ (" -?, --help show this help, then exit\n" ));
298+ printf (_ ("\n"
299+ "Before running pg_upgrade you must:\n"
300+ " create a new database cluster (using the new version of initdb)\n"
301+ " shutdown the postmaster servicing the old cluster\n"
302+ " shutdown the postmaster servicing the new cluster\n" ));
303+ printf (_ ("\n"
304+ "When you run pg_upgrade, you must provide the following information:\n"
305+ " the data directory for the old cluster (-d DATADIR)\n"
306+ " the data directory for the new cluster (-D DATADIR)\n"
307+ " the \"bin\" directory for the old version (-b BINDIR)\n"
308+ " the \"bin\" directory for the new version (-B BINDIR)\n" ));
309+ printf (_ ("\n"
310+ "For example:\n"
311+ " pg_upgrade -d oldCluster/data -D newCluster/data -b oldCluster/bin -B newCluster/bin\n"
312+ "or\n" ));
314313#ifndef WIN32
315- printf (_ ("\
316- $ export PGDATAOLD=oldCluster/data\n\
317- $ export PGDATANEW=newCluster/data\n\
318- $ export PGBINOLD=oldCluster/bin\n\
319- $ export PGBINNEW=newCluster/bin\n\
320- $ pg_upgrade\n" ));
314+ printf (_ (" $ export PGDATAOLD=oldCluster/data\n"
315+ " $ export PGDATANEW=newCluster/data\n"
316+ " $ export PGBINOLD=oldCluster/bin\n"
317+ " $ export PGBINNEW=newCluster/bin\n"
318+ " $ pg_upgrade\n" ));
321319#else
322- printf (_ ("\
323- C:\\> set PGDATAOLD=oldCluster/data\n\
324- C:\\> set PGDATANEW=newCluster/data\n\
325- C:\\> set PGBINOLD=oldCluster/bin\n\
326- C:\\> set PGBINNEW=newCluster/bin\n\
327- C:\\> pg_upgrade\n" ));
320+ printf (_ (" C:\\> set PGDATAOLD=oldCluster/data\n"
321+ " C:\\> set PGDATANEW=newCluster/data\n"
322+ " C:\\> set PGBINOLD=oldCluster/bin\n"
323+ " C:\\> set PGBINNEW=newCluster/bin\n"
324+ " C:\\> pg_upgrade\n" ));
328325#endif
329326 printf (_ ("\nReport bugs to <pgsql-bugs@postgresql.org>.\n" ));
330327}
0 commit comments