@@ -794,7 +794,7 @@ main(int argc, char **argv)
794794if (sscanf (optarg , "%u" , & config .filter_by_relation_block ) != 1 ||
795795!BlockNumberIsValid (config .filter_by_relation_block ))
796796{
797- pg_log_error ("could not parse valid block number \"%s\"" , optarg );
797+ pg_log_error ("invalid block number: \"%s\"" , optarg );
798798goto bad_argument ;
799799}
800800config .filter_by_relation_block_enabled = true;
@@ -803,7 +803,7 @@ main(int argc, char **argv)
803803case 'e' :
804804if (sscanf (optarg , "%X/%X" , & xlogid , & xrecoff ) != 2 )
805805{
806- pg_log_error ("could not parse end WAL location \"%s\"" ,
806+ pg_log_error ("invalid WAL location: \"%s\"" ,
807807 optarg );
808808goto bad_argument ;
809809}
@@ -816,15 +816,15 @@ main(int argc, char **argv)
816816config .filter_by_relation_forknum = forkname_to_number (optarg );
817817if (config .filter_by_relation_forknum == InvalidForkNumber )
818818{
819- pg_log_error ("could not parse fork \"%s\"" , optarg );
819+ pg_log_error ("invalid fork name: \"%s\"" , optarg );
820820goto bad_argument ;
821821}
822822config .filter_by_extended = true;
823823break ;
824824case 'n' :
825825if (sscanf (optarg , "%d" , & config .stop_after_records ) != 1 )
826826{
827- pg_log_error ("could not parse limit \"%s\"" , optarg );
827+ pg_log_error ("invalid value \"%s\" for option %s " , optarg , "-n/--limit" );
828828goto bad_argument ;
829829}
830830break ;
@@ -891,9 +891,8 @@ main(int argc, char **argv)
891891!OidIsValid (config .filter_by_relation .spcNode ) ||
892892!OidIsValid (config .filter_by_relation .relNode ))
893893{
894- pg_log_error ("could not parse valid relation from \"%s\""
895- " (expecting \"tablespace OID/database OID/"
896- "relation filenode\")" , optarg );
894+ pg_log_error ("invalid relation specification: \"%s\"" , optarg );
895+ pg_log_error_detail ("Expecting \"tablespace OID/database OID/relation filenode\"." );
897896goto bad_argument ;
898897}
899898config .filter_by_relation_enabled = true;
@@ -902,7 +901,7 @@ main(int argc, char **argv)
902901case 's' :
903902if (sscanf (optarg , "%X/%X" , & xlogid , & xrecoff ) != 2 )
904903{
905- pg_log_error ("could not parse start WAL location \"%s\"" ,
904+ pg_log_error ("invalid WAL location: \"%s\"" ,
906905 optarg );
907906goto bad_argument ;
908907}
@@ -912,7 +911,7 @@ main(int argc, char **argv)
912911case 't' :
913912if (sscanf (optarg , "%u" , & private .timeline ) != 1 )
914913{
915- pg_log_error ("could not parse timeline \"%s\"" , optarg );
914+ pg_log_error ("invalid timeline specification: \"%s\"" , optarg );
916915goto bad_argument ;
917916}
918917break ;
@@ -922,7 +921,7 @@ main(int argc, char **argv)
922921case 'x' :
923922if (sscanf (optarg , "%u" , & config .filter_by_xid ) != 1 )
924923{
925- pg_log_error ("could not parse \"%s\" as a transaction ID " ,
924+ pg_log_error ("invalid transaction ID specification: \"%s\"" ,
926925 optarg );
927926goto bad_argument ;
928927}
@@ -937,8 +936,8 @@ main(int argc, char **argv)
937936config .stats_per_record = true;
938937else if (strcmp (optarg , "rmgr" ) != 0 )
939938{
940- pg_log_error ("unrecognized argument to --stats : %s" ,
941- optarg );
939+ pg_log_error ("unrecognized value for option %s : %s" ,
940+ "--stats" , optarg );
942941goto bad_argument ;
943942}
944943}
@@ -951,7 +950,8 @@ main(int argc, char **argv)
951950if (config .filter_by_relation_block_enabled &&
952951!config .filter_by_relation_enabled )
953952{
954- pg_log_error ("--block option requires --relation option to be specified" );
953+ pg_log_error ("option %s requires option %s to be specified" ,
954+ "-B/--block" , "-R/--relation" );
955955goto bad_argument ;
956956}
957957
0 commit comments