pg_dump --with-* options

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_dump --with-* options
Date: 2025-06-06 07:14:32
Message-ID: 7cc52488-f876-4ad3-affd-6e4b0ef0cb09@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm looking at the new in PG18 pg_dump --with-* options, and I'm having
trouble understanding them. (I did not look into the source code or the
git or mailing list history for this, to try to understand it as a user.)

We have

-a, --data-only dump only the data, not the schema or statistics
--no-data do not dump data
--with-data dump the data # this one is new

(and there is also --section=data), and then three analogous options for
"schema" and "statistics".

What is the purpose of the --with-data option? Dumping the data is the
default. Is this to override an earlier --no-data option?

The man page is only minimally more verbose: "Dump data. This is the
default." But why do you then need this option?

I think we should add some more documenting detail for these, but right
now I don't know what it would be.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message wenhui qiu 2025-06-06 07:30:48 Re: Proposal: Global Index for PostgreSQL
Previous Message jian he 2025-06-06 07:13:22 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands