@@ -523,7 +523,7 @@ main(int argc, char **argv)
523523 */
524524if (!globals_only && opts -> createDB != 1 )
525525{
526- pg_log_error ("-C/--createoption should be specified when restoring an archive created by pg_dumpall" );
526+ pg_log_error ("option -C/--createmust be specified when restoring an archive created by pg_dumpall" );
527527pg_log_error_hint ("Try \"%s --help\" for more information." ,progname );
528528pg_log_error_hint ("Individual databases can be restored using their specific archives." );
529529exit_nicely (1 );
@@ -557,7 +557,7 @@ main(int argc, char **argv)
557557if (conn )
558558PQfinish (conn );
559559
560- pg_log_info ("database restoring skippedas -g/--globals-only option was specified" );
560+ pg_log_info ("database restoring skippedbecause option -g/--globals-only was specified" );
561561}
562562else
563563{
@@ -725,8 +725,8 @@ usage(const char *progname)
725725printf (_ (" --role=ROLENAME do SET ROLE before restore\n" ));
726726
727727printf (_ ("\n"
728- "The options -I, -n, -N, -P, -t, -T, --section, and --exclude-database can be combined \n"
729- "and specified multiple times to select multiple objects.\n" ));
728+ "The options -I, -n, -N, -P, -t, -T, --section, and --exclude-database can be\n"
729+ "combined and specified multiple times to select multiple objects.\n" ));
730730printf (_ ("\nIf no input file name is supplied, then standard input is used.\n\n" ));
731731printf (_ ("Report bugs to <%s>.\n" ),PACKAGE_BUGREPORT );
732732printf (_ ("%s home page: <%s>\n" ),PACKAGE_NAME ,PACKAGE_URL );
@@ -946,7 +946,7 @@ get_dbnames_list_to_restore(PGconn *conn,
946946query = createPQExpBuffer ();
947947
948948if (!conn )
949- pg_log_info ("considering PATTERN as NAME for --exclude-database option as nodb connection while doing pg_restore. " );
949+ pg_log_info ("considering PATTERN as NAME for --exclude-database option as nodatabase connection while doing pg_restore" );
950950
951951/*
952952 * Process one by one all dbnames and if specified to skip restoring, then
@@ -992,7 +992,7 @@ get_dbnames_list_to_restore(PGconn *conn,
992992if ((PQresultStatus (res )== PGRES_TUPLES_OK )&& PQntuples (res ))
993993{
994994skip_db_restore = true;
995- pg_log_info ("database \"%s\" matches exclude pattern: \"%s\"" ,dbidname -> str ,pat_cell -> val );
995+ pg_log_info ("databasename \"%s\" matches exclude pattern \"%s\"" ,dbidname -> str ,pat_cell -> val );
996996}
997997
998998PQclear (res );
@@ -1048,7 +1048,7 @@ get_dbname_oid_list_from_mfile(const char *dumpdirpath, SimplePtrList *dbname_oi
10481048 */
10491049if (!file_exists_in_directory (dumpdirpath ,"map.dat" ))
10501050{
1051- pg_log_info ("database restoring is skippedas \"map.dat \"is notpresent in \"%s\"" ,dumpdirpath );
1051+ pg_log_info ("database restoring is skippedbecause file \"%s \"does notexist indirectory \"%s\"" , "map.dat " ,dumpdirpath );
10521052return 0 ;
10531053}
10541054
@@ -1058,7 +1058,7 @@ get_dbname_oid_list_from_mfile(const char *dumpdirpath, SimplePtrList *dbname_oi
10581058pfile = fopen (map_file_path ,PG_BINARY_R );
10591059
10601060if (pfile == NULL )
1061- pg_fatal ("could not open \"%s\": %m" ,map_file_path );
1061+ pg_fatal ("could not openfile \"%s\": %m" ,map_file_path );
10621062
10631063initStringInfo (& linebuf );
10641064
@@ -1086,10 +1086,10 @@ get_dbname_oid_list_from_mfile(const char *dumpdirpath, SimplePtrList *dbname_oi
10861086
10871087/* Report error and exit if the file has any corrupted data. */
10881088if (!OidIsValid (db_oid )|| namelen <=1 )
1089- pg_fatal ("invalid entry in \"%s\"at line: %d" ,map_file_path ,
1089+ pg_fatal ("invalid entry infile \"%s\"on line %d" ,map_file_path ,
10901090count + 1 );
10911091
1092- pg_log_info ("found database \"%s\" (OID: %u) in \"%s\"" ,
1092+ pg_log_info ("found database \"%s\" (OID: %u) infile \"%s\"" ,
10931093dbname ,db_oid ,map_file_path );
10941094
10951095dbidname = pg_malloc (offsetof(DbOidName ,str )+ namelen + 1 );
@@ -1142,11 +1142,14 @@ restore_all_databases(PGconn *conn, const char *dumpdirpath,
11421142if (dbname_oid_list .head == NULL )
11431143return process_global_sql_commands (conn ,dumpdirpath ,opts -> filename );
11441144
1145- pg_log_info ("found %d database names in \"map.dat\"" ,num_total_db );
1145+ pg_log_info (ngettext ("found %d database name in \"%s\"" ,
1146+ "found %d database names in \"%s\"" ,
1147+ num_total_db ),
1148+ num_total_db ,"map.dat" );
11461149
11471150if (!conn )
11481151{
1149- pg_log_info ("trying to connect database \"postgres\" " );
1152+ pg_log_info ("trying to connectto database \"%s\"" , "postgres " );
11501153
11511154conn = ConnectDatabase ("postgres" ,NULL ,opts -> cparams .pghost ,
11521155opts -> cparams .pgport ,opts -> cparams .username ,TRI_DEFAULT ,
@@ -1155,7 +1158,7 @@ restore_all_databases(PGconn *conn, const char *dumpdirpath,
11551158/* Try with template1. */
11561159if (!conn )
11571160{
1158- pg_log_info ("trying to connect database \"template1\" " );
1161+ pg_log_info ("trying to connectto database \"%s\"" , "template1 " );
11591162
11601163conn = ConnectDatabase ("template1" ,NULL ,opts -> cparams .pghost ,
11611164opts -> cparams .pgport ,opts -> cparams .username ,TRI_DEFAULT ,
@@ -1179,7 +1182,9 @@ restore_all_databases(PGconn *conn, const char *dumpdirpath,
11791182/* Exit if no db needs to be restored. */
11801183if (dbname_oid_list .head == NULL || num_db_restore == 0 )
11811184{
1182- pg_log_info ("no database needs to restore out of %d databases" ,num_total_db );
1185+ pg_log_info (ngettext ("no database needs restoring out of %d database" ,
1186+ "no database needs restoring out of %d databases" ,num_total_db ),
1187+ num_total_db );
11831188return n_errors_total ;
11841189}
11851190
@@ -1314,7 +1319,7 @@ process_global_sql_commands(PGconn *conn, const char *dumpdirpath, const char *o
13141319pfile = fopen (global_file_path ,PG_BINARY_R );
13151320
13161321if (pfile == NULL )
1317- pg_fatal ("could not open \"%s\": %m" ,global_file_path );
1322+ pg_fatal ("could not openfile \"%s\": %m" ,global_file_path );
13181323
13191324/*
13201325 * If outfile is given, then just copy all global.dat file data into
@@ -1354,15 +1359,17 @@ process_global_sql_commands(PGconn *conn, const char *dumpdirpath, const char *o
13541359break ;
13551360default :
13561361n_errors ++ ;
1357- pg_log_error ("could not execute query: \"%s\" \nCommand was: \"%s\"" ,PQerrorMessage (conn ),sqlstatement .data );
1362+ pg_log_error ("could not execute query: %s" ,PQerrorMessage (conn ));
1363+ pg_log_error_detail ("Command was: %s" ,sqlstatement .data );
13581364}
13591365PQclear (result );
13601366}
13611367
13621368/* Print a summary of ignored errors during global.dat. */
13631369if (n_errors )
1364- pg_log_warning ("ignored %d errors in \"%s\"" ,n_errors ,global_file_path );
1365-
1370+ pg_log_warning (ngettext ("ignored %d error in file \"%s\"" ,
1371+ "ignored %d errors in file \"%s\"" ,n_errors ),
1372+ n_errors ,global_file_path );
13661373fclose (pfile );
13671374
13681375return n_errors ;