@@ -794,7 +794,7 @@ main(int argc, char **argv)
794
794
if (sscanf (optarg , "%u" , & config .filter_by_relation_block ) != 1 ||
795
795
!BlockNumberIsValid (config .filter_by_relation_block ))
796
796
{
797
- pg_log_error ("could not parse valid block number \"%s\"" , optarg );
797
+ pg_log_error ("invalid block number: \"%s\"" , optarg );
798
798
goto bad_argument ;
799
799
}
800
800
config .filter_by_relation_block_enabled = true;
@@ -803,7 +803,7 @@ main(int argc, char **argv)
803
803
case 'e' :
804
804
if (sscanf (optarg , "%X/%X" , & xlogid , & xrecoff ) != 2 )
805
805
{
806
- pg_log_error ("could not parse end WAL location \"%s\"" ,
806
+ pg_log_error ("invalid WAL location: \"%s\"" ,
807
807
optarg );
808
808
goto bad_argument ;
809
809
}
@@ -816,15 +816,15 @@ main(int argc, char **argv)
816
816
config .filter_by_relation_forknum = forkname_to_number (optarg );
817
817
if (config .filter_by_relation_forknum == InvalidForkNumber )
818
818
{
819
- pg_log_error ("could not parse fork \"%s\"" , optarg );
819
+ pg_log_error ("invalid fork name: \"%s\"" , optarg );
820
820
goto bad_argument ;
821
821
}
822
822
config .filter_by_extended = true;
823
823
break ;
824
824
case 'n' :
825
825
if (sscanf (optarg , "%d" , & config .stop_after_records ) != 1 )
826
826
{
827
- pg_log_error ("could not parse limit \"%s\"" , optarg );
827
+ pg_log_error ("invalid value \"%s\" for option %s " , optarg , "-n/--limit" );
828
828
goto bad_argument ;
829
829
}
830
830
break ;
@@ -891,9 +891,8 @@ main(int argc, char **argv)
891
891
!OidIsValid (config .filter_by_relation .spcNode ) ||
892
892
!OidIsValid (config .filter_by_relation .relNode ))
893
893
{
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\"." );
897
896
goto bad_argument ;
898
897
}
899
898
config .filter_by_relation_enabled = true;
@@ -902,7 +901,7 @@ main(int argc, char **argv)
902
901
case 's' :
903
902
if (sscanf (optarg , "%X/%X" , & xlogid , & xrecoff ) != 2 )
904
903
{
905
- pg_log_error ("could not parse start WAL location \"%s\"" ,
904
+ pg_log_error ("invalid WAL location: \"%s\"" ,
906
905
optarg );
907
906
goto bad_argument ;
908
907
}
@@ -912,7 +911,7 @@ main(int argc, char **argv)
912
911
case 't' :
913
912
if (sscanf (optarg , "%u" , & private .timeline ) != 1 )
914
913
{
915
- pg_log_error ("could not parse timeline \"%s\"" , optarg );
914
+ pg_log_error ("invalid timeline specification: \"%s\"" , optarg );
916
915
goto bad_argument ;
917
916
}
918
917
break ;
@@ -922,7 +921,7 @@ main(int argc, char **argv)
922
921
case 'x' :
923
922
if (sscanf (optarg , "%u" , & config .filter_by_xid ) != 1 )
924
923
{
925
- pg_log_error ("could not parse \"%s\" as a transaction ID " ,
924
+ pg_log_error ("invalid transaction ID specification: \"%s\"" ,
926
925
optarg );
927
926
goto bad_argument ;
928
927
}
@@ -937,8 +936,8 @@ main(int argc, char **argv)
937
936
config .stats_per_record = true;
938
937
else if (strcmp (optarg , "rmgr" ) != 0 )
939
938
{
940
- pg_log_error ("unrecognized argument to --stats : %s" ,
941
- optarg );
939
+ pg_log_error ("unrecognized value for option %s : %s" ,
940
+ "--stats" , optarg );
942
941
goto bad_argument ;
943
942
}
944
943
}
@@ -951,7 +950,8 @@ main(int argc, char **argv)
951
950
if (config .filter_by_relation_block_enabled &&
952
951
!config .filter_by_relation_enabled )
953
952
{
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" );
955
955
goto bad_argument ;
956
956
}
957
957
0 commit comments