@@ -823,23 +823,30 @@ main(int argc, char **argv)
823823
824824 /* reject conflicting "-only" options */
825825 if (data_only && schema_only)
826- pg_fatal("options -s/--schema-only and -a/--data-only cannot be used together");
826+ pg_fatal("options %s and %s cannot be used together",
827+ "-s/--schema-only", "-a/--data-only");
827828 if (schema_only && statistics_only)
828- pg_fatal("options -s/--schema-only and --statistics-only cannot be used together");
829+ pg_fatal("options %s and %s cannot be used together",
830+ "-s/--schema-only", "--statistics-only");
829831 if (data_only && statistics_only)
830- pg_fatal("options -a/--data-only and --statistics-only cannot be used together");
832+ pg_fatal("options %s and %s cannot be used together",
833+ "-a/--data-only", "--statistics-only");
831834
832835 /* reject conflicting "-only" and "no-" options */
833836 if (data_only && no_data)
834- pg_fatal("options -a/--data-only and --no-data cannot be used together");
837+ pg_fatal("options %s and %s cannot be used together",
838+ "-a/--data-only", "--no-data");
835839 if (schema_only && no_schema)
836- pg_fatal("options -s/--schema-only and --no-schema cannot be used together");
840+ pg_fatal("options %s and %s cannot be used together",
841+ "-s/--schema-only", "--no-schema");
837842 if (statistics_only && no_statistics)
838- pg_fatal("options --statistics-only and --no-statistics cannot be used together");
843+ pg_fatal("options %s and %s cannot be used together",
844+ "--statistics-only", "--no-statistics");
839845
840846 /* reject conflicting "no-" options */
841847 if (with_statistics && no_statistics)
842- pg_fatal("options --statistics and --no-statistics cannot be used together");
848+ pg_fatal("options %s and %s cannot be used together",
849+ "--statistics", "--no-statistics");
843850
844851 /* reject conflicting "-only" options */
845852 if (data_only && with_statistics)
@@ -850,16 +857,20 @@ main(int argc, char **argv)
850857 "-s/--schema-only", "--statistics");
851858
852859 if (schema_only && foreign_servers_include_patterns.head != NULL)
853- pg_fatal("options -s/--schema-only and --include-foreign-data cannot be used together");
860+ pg_fatal("options %s and %s cannot be used together",
861+ "-s/--schema-only", "--include-foreign-data");
854862
855863 if (numWorkers > 1 && foreign_servers_include_patterns.head != NULL)
856- pg_fatal("option --include-foreign-data is not supported with parallel backup");
864+ pg_fatal("option %s is not supported with parallel backup",
865+ "--include-foreign-data");
857866
858867 if (data_only && dopt.outputClean)
859- pg_fatal("options -c/--clean and -a/--data-only cannot be used together");
868+ pg_fatal("options %s and %s cannot be used together",
869+ "-c/--clean", "-a/--data-only");
860870
861871 if (dopt.if_exists && !dopt.outputClean)
862- pg_fatal("option --if-exists requires option -c/--clean");
872+ pg_fatal("option %s requires option %s",
873+ "--if-exists", "-c/--clean");
863874
864875 /*
865876 * Set derivative flags. Ambiguous or nonsensical combinations, e.g.
@@ -879,7 +890,9 @@ main(int argc, char **argv)
879890 * --rows-per-insert were specified.
880891 */
881892 if (dopt.do_nothing && dopt.dump_inserts == 0)
882- pg_fatal("option --on-conflict-do-nothing requires option --inserts, --rows-per-insert, or --column-inserts");
893+ pg_fatal("option %s requires option %s, %s, or %s",
894+ "--on-conflict-do-nothing",
895+ "--inserts", "--rows-per-insert", "--column-inserts");
883896
884897 /* Identify archive format to emit */
885898 archiveFormat = parseArchiveFormat(format, &archiveMode);
@@ -900,7 +913,8 @@ main(int argc, char **argv)
900913 pg_fatal("invalid restrict key");
901914 }
902915 else if (dopt.restrict_key)
903- pg_fatal("option --restrict-key can only be used with --format=plain");
916+ pg_fatal("option %s can only be used with %s",
917+ "--restrict-key", "--format=plain");
904918
905919 /*
906920 * Custom and directory formats are compressed by default with gzip when
0 commit comments