Re: pg_dump --with-* options

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump --with-* options
Date: 2025-07-29 18:22:24
Message-ID: 202507291822.z4sc4ddvg2kx@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025-Jul-29, Jeff Davis wrote:

> + /* reject conflicting "only-" and "with-" options */
> + if (data_only && with_schema)
> + pg_fatal("options -a/--data-only and --with-schema cannot be used together");
> + if (data_only && with_statistics)
> + pg_fatal("options -a/--data-only and --with-statistics cannot be used together");
> + if (schema_only && with_data)
> + pg_fatal("options -s/--schema-only and --with-data cannot be used together");
> + if (schema_only && with_statistics)
> + pg_fatal("options -s/--schema-only and --with-statistics cannot be used together");
> + if (statistics_only && with_data)
> + pg_fatal("options --statistics-only and --with-data cannot be used together");
> + if (statistics_only && with_schema)
> + pg_fatal("options --statistics-only and --with-schema cannot be used together");

Please move the switches themselves out of the translatable message,
otherwise there are too many of them. For instance,

pg_fatal("options %s and %s cannot be used together",
"-s/--schema-only", "--with-statistics");

Thanks

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-07-29 18:24:23 Re: Enable data checksums by default
Previous Message Andrey Borodin 2025-07-29 18:15:28 Re: IPC/MultixactCreation on the Standby server