Re: pg_dump --with-* options - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: pg_dump --with-* options
Date
Msg-id CADkLM=fXSiX4GQ7F6__z+ofGpp0QwwytGP-GNeVQyMhc29bbwQ@mail.gmail.com
Whole thread Raw
In response to Re: pg_dump --with-* options  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: pg_dump --with-* options
Re: pg_dump --with-* options
List pgsql-hackers
I noticed that --statistics (i.e., the current --with-statistics) causes
statistics to be dumped even when used with --data-only or --schema-only.
So, as far as I understand, here are the possible combinations of dump
targets and options:

Those should also be mutually exclusive, and I'll write up a patch to add them to the checks.
 

  schema, data, stats:       --statistics
  schema, data:              (default)
  schema, stats:             --schema-only --statistics
  data, stats:               --data-only --statistics
  schema only:               --schema-only
  data only:                 --data-only
  stats only:                --statistics-only

This makes me wonder if --no-data and --no-schema are still necessary.
They were also introduced in v18, but might now be redundant. If so,
should we consider removing them?

If we do keep them, we could also use --no-schema --statistics to
dump data and statistics, but I find --data-only --statistics more intuitive.

I think this is the exact sort of confusion caused by having two of the three types default to on in all circumstances, and one default to off in one special circumstance.

Let's keep this simple, and have all three types default to on in all circumstances.

pgsql-hackers by date:

Previous
From: Arseniy Mukhin
Date:
Subject: Re: Amcheck verification of GiST and GIN
Next
From: Corey Huinker
Date:
Subject: Re: Allow pg_dump --statistics-only to dump foreign table statistics?