> On 13 Jun 2025, at 02:39, Fujii Masao <masao.fu...@oss.nttdata.com> wrote:
> By the way, if we keep --with-statistics in pg_dump, are we planning to > continue using the --with-xxx naming pattern for new options that > specify extra data to dump? I just wondered because pg_dump already has > other naming styles like --sequence-data, --include-foreign-data, > and --large-objects. There are quite a number of different conventions in use for pg_dump parameters, I'm not convinced that we are doing users a favour by adding yet another one here with --with-XXX. AFAICT we have: * --XXX which includes all of XXX, for example --large-objects * --with-XXX which includes all of XXX, for example --with-data * --XXX=YYY which includes XXX matching pattern YYY, for example --table * --include-XXX=YYY which includes all of XXX matching pattern YYY, like --include-foreign-data * --exclude-XXX=YYY which excludes XXX matching pattern YYY, for example --exclude-table * --no-XXX which excludes all of XXX, for example --no-comments * --XXX-only which excludes objects that aren't XXX For some things we also have short options which corresponds to --XXX and --exclude-XXX like -t and -T, but -e and -E break that again. Most object types can be included and excluded, except --include-foreign-data where there is no exclusion parameter (and the pattern also applies to the servername and not data). Then there are features affecting the dump output which either use --YYY or --use-YYY , like --inserts and --use-set-session-authorization. Other features which affect what can be be be dumped instead use --enable-XXX like --enable-row-security. Then --snapshot deviates from both since it has neither --use nor --enable even though it's a similar category of options. On top of that, we have the --filter=FILE which can include and exclude objects (limited to objects where there is a corresponding commandline parameter). Changing existing parameters is of course hard since it will break scripts and integrations, but should we really add --with-XXX and increase the proliferation of concepts rather than trying to make it fit/shoehorn into one of the ones we already have? -- Daniel Gustafsson