Thread: Marking options deprecated in help output

Marking options deprecated in help output

From
Daniel Gustafsson
Date:
In the pg_dump blob terminology thread it was briefly discussed [0] to mark
parameters as deprecated in the --help output.  The attached is a quick diff to
show that that would look like.  Personally I think it makes sense, not
everyone will read the docs.

--
Daniel Gustafsson        https://vmware.com/

[0] 95467596-834d-baa4-c67c-5db1096ed549@enterprisedb.com


Attachment

Re: Marking options deprecated in help output

From
Heikki Linnakangas
Date:
On 05/12/2022 11:42, Daniel Gustafsson wrote:
> In the pg_dump blob terminology thread it was briefly discussed [0] to mark
> parameters as deprecated in the --help output.  The attached is a quick diff to
> show that that would look like.  Personally I think it makes sense, not
> everyone will read the docs.

Makes sense. One minor suggestion; instead of this:

>   -h, -H, --host=HOSTNAME    database server host or socket directory
>                              (-H is deprecated)

How about putting the deprecated option on a separate line like this:

>   -h, --host=HOSTNAME        database server host or socket directory
>   -H                         (same as -h, deprecated)

And same for --blobs and -no-blobs

- Heikki




Re: Marking options deprecated in help output

From
Daniel Gustafsson
Date:
> On 24 Feb 2023, at 21:31, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> On 05/12/2022 11:42, Daniel Gustafsson wrote:

> How about putting the deprecated option on a separate line like this:
>
>>  -h, --host=HOSTNAME        database server host or socket directory
>>  -H                         (same as -h, deprecated)

If nothing else, it helps to keep it shorter and avoids breaking the line
between command and description, so I agree with you.  Done in the attached v2.

--
Daniel Gustafsson


Attachment