@@ -52,10 +52,10 @@ libpqConnect(const char *connstr)
5252
5353conn = PQconnectdb (connstr );
5454if (PQstatus (conn )== CONNECTION_BAD )
55- pg_fatal ("could not connect toremote server: %s\n " ,
55+ pg_fatal ("could not connect to server: %s" ,
5656PQerrorMessage (conn ));
5757
58- pg_log (PG_PROGRESS ,"connected toremote server\n" );
58+ pg_log (PG_PROGRESS ,"connected to server\n" );
5959
6060/*
6161 * Check that the server is not in hot standby mode. There is no
@@ -91,12 +91,12 @@ run_simple_query(const char *sql)
9191res = PQexec (conn ,sql );
9292
9393if (PQresultStatus (res )!= PGRES_TUPLES_OK )
94- pg_fatal ("error running query (%s) in source server: %s\n " ,
94+ pg_fatal ("error running query (%s) in source server: %s" ,
9595sql ,PQresultErrorMessage (res ));
9696
9797/* sanity check the result set */
9898if (PQnfields (res )!= 1 || PQntuples (res )!= 1 || PQgetisnull (res ,0 ,0 ))
99- pg_fatal ("unexpected result setwhile running query\n" );
99+ pg_fatal ("unexpected result setfrom query\n" );
100100
101101result = pg_strdup (PQgetvalue (res ,0 ,0 ));
102102
@@ -119,7 +119,7 @@ libpqGetCurrentXlogInsertLocation(void)
119119val = run_simple_query ("SELECT pg_current_xlog_insert_location()" );
120120
121121if (sscanf (val ,"%X/%X" ,& hi ,& lo )!= 2 )
122- pg_fatal ("unexpected result \"%s\"while fetching current XLOG insert location\n" ,val );
122+ pg_fatal ("unrecognized result \"%s\"for current XLOG insert location\n" ,val );
123123
124124result = ((uint64 )hi ) <<32 |lo ;
125125
@@ -167,7 +167,7 @@ libpqProcessFileList(void)
167167res = PQexec (conn ,sql );
168168
169169if (PQresultStatus (res )!= PGRES_TUPLES_OK )
170- pg_fatal ("unexpected result while fetching file list: %s\n " ,
170+ pg_fatal ("could not fetch file list: %s" ,
171171PQresultErrorMessage (res ));
172172
173173/* sanity check the result set */
@@ -210,7 +210,7 @@ receiveFileChunks(const char *sql)
210210PGresult * res ;
211211
212212if (PQsendQueryParams (conn ,sql ,0 ,NULL ,NULL ,NULL ,NULL ,1 )!= 1 )
213- pg_fatal ("could not send query: %s\n " ,PQerrorMessage (conn ));
213+ pg_fatal ("could not send query: %s" ,PQerrorMessage (conn ));
214214
215215pg_log (PG_DEBUG ,"getting file chunks" );
216216
@@ -262,7 +262,7 @@ receiveFileChunks(const char *sql)
262262PQgetisnull (res ,0 ,1 )||
263263PQgetisnull (res ,0 ,2 ))
264264{
265- pg_fatal ("unexpectedNULL result while fetching remote files\n" );
265+ pg_fatal ("unexpectednull values in result while fetching remote files\n" );
266266}
267267
268268if (PQgetlength (res ,0 ,1 )!= sizeof (int32 ))
@@ -280,7 +280,7 @@ receiveFileChunks(const char *sql)
280280
281281chunk = PQgetvalue (res ,0 ,2 );
282282
283- pg_log (PG_DEBUG ,"received chunk for file \"%s\",off %d,len %d\n" ,
283+ pg_log (PG_DEBUG ,"received chunk for file \"%s\",offset %d,size %d\n" ,
284284filename ,chunkoff ,chunksize );
285285
286286open_target_file (filename , false);
@@ -309,7 +309,7 @@ libpqGetFile(const char *filename, size_t *filesize)
3093091 ,NULL ,paramValues ,NULL ,NULL ,1 );
310310
311311if (PQresultStatus (res )!= PGRES_TUPLES_OK )
312- pg_fatal ("unexpected result while fetching remote file \"%s\": %s\n " ,
312+ pg_fatal ("could not fetch remote file \"%s\": %s" ,
313313filename ,PQresultErrorMessage (res ));
314314
315315/* sanity check the result set */
@@ -355,7 +355,7 @@ fetch_file_range(const char *path, unsigned int begin, unsigned int end)
355355snprintf (linebuf ,sizeof (linebuf ),"%s\t%u\t%u\n" ,path ,begin ,len );
356356
357357if (PQputCopyData (conn ,linebuf ,strlen (linebuf ))!= 1 )
358- pg_fatal ("error sending COPY data: %s\n " ,
358+ pg_fatal ("could not send COPY data: %s" ,
359359PQerrorMessage (conn ));
360360
361361begin += len ;
@@ -381,14 +381,14 @@ libpq_executeFileMap(filemap_t *map)
381381res = PQexec (conn ,sql );
382382
383383if (PQresultStatus (res )!= PGRES_COMMAND_OK )
384- pg_fatal ("error creating temporary table: %s\n " ,
384+ pg_fatal ("could not create temporary table: %s" ,
385385PQresultErrorMessage (res ));
386386
387387sql = "COPY fetchchunks FROM STDIN" ;
388388res = PQexec (conn ,sql );
389389
390390if (PQresultStatus (res )!= PGRES_COPY_IN )
391- pg_fatal ("unexpected result while sending file list: %s\n " ,
391+ pg_fatal ("could not send file list: %s" ,
392392PQresultErrorMessage (res ));
393393
394394for (i = 0 ;i < map -> narray ;i ++ )
@@ -429,13 +429,13 @@ libpq_executeFileMap(filemap_t *map)
429429}
430430
431431if (PQputCopyEnd (conn ,NULL )!= 1 )
432- pg_fatal ("error sending end-of-COPY: %s\n " ,
432+ pg_fatal ("could not send end-of-COPY: %s" ,
433433PQerrorMessage (conn ));
434434
435435while ((res = PQgetResult (conn ))!= NULL )
436436{
437437if (PQresultStatus (res )!= PGRES_COMMAND_OK )
438- pg_fatal ("unexpected result while sending file list: %s\n " ,
438+ pg_fatal ("unexpected result while sending file list: %s" ,
439439PQresultErrorMessage (res ));
440440}
441441