| From: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | Nathan Bossart <nathandbossart(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, wangpeng <215722532(at)qq(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: pg_dumpall --roles-only interact with other options |
| Date: | 2026-03-03 07:40:22 |
| Message-ID: | CAN4CZFNd5KRy5=iNtjRPDWU5WnEJxpkCUXnY0exU-LOJJimyEw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zhijie Hou (Fujitsu) | 2026-03-03 07:42:31 | RE: Fix slotsync worker busy loop causing repeated log messages |
| Previous Message | Chao Li | 2026-03-03 07:34:35 | Re: doc: Clarify that empty COMMENT string removes the comment |