This is definitely better. I suggested an array based approach back in
my first email to the thread, and that didn't get any positive
feedback, so I thought people prefer the simple ifs.
- pg_log_error_hint("Try \"%s --help\" for more information.", progname);
This error hint comment is now missing, was that intentional?
+ CheckMutuallyExclusiveOpts(12, globals_only, "-g/--globals-only",
+ roles_only, "-r/--roles-only",
+ tablespaces_only, "-t/--tablespaces-only",
+ data_only, "-a/--data-only",
+ schema_only, "-s/--schema-only",
+ statistics_only, "--statistics-only");
+ CheckMutuallyExclusiveOpts(12,
+ globals_only, "-g/--globals-only",
+ roles_only, "-r/--roles-only",
+ tablespaces_only, "-t/--tablespaces-only",
+ schema_only, "-s/--schema-only",
+ data_only, "-a/--data-only",
+ with_statistics, "--statistics");
This was confusing it at first. data_only schema_only are present on
both but in different order, the only real difference is
with_statistics/statistics_only. I would fix the order and add a
comment that only the last item differs.