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

From Álvaro Herrera
Subject Re: pg_dump --with-* options
Date
Msg-id 202507291822.z4sc4ddvg2kx@alvherre.pgsql
Whole thread Raw
In response to Re: pg_dump --with-* options  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: pg_dump --with-* options
List 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/



pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: IPC/MultixactCreation on the Standby server
Next
From: Tomas Vondra
Date:
Subject: Re: Enable data checksums by default