Re: pg_dumpall --roles-only interact with other options - Mailing list pgsql-hackers

From Zsolt Parragi
Subject Re: pg_dumpall --roles-only interact with other options
Date
Msg-id CAN4CZFNd5KRy5=iNtjRPDWU5WnEJxpkCUXnY0exU-LOJJimyEw@mail.gmail.com
Whole thread
In response to Re: pg_dumpall --roles-only interact with other options  (Chao Li <li.evan.chao@gmail.com>)
List pgsql-hackers
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.



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: doc: Clarify that empty COMMENT string removes the comment
Next
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: RE: Fix slotsync worker busy loop causing repeated log messages