Re: Fix help option of contrib/oid2name - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Fix help option of contrib/oid2name
Date
Msg-id 20180820045457.GI7403@paquier.xyz
Whole thread Raw
In response to Re: Fix help option of contrib/oid2name  (Tatsuro Yamada <yamada.tatsuro@lab.ntt.co.jp>)
Responses Re: Fix help option of contrib/oid2name
List pgsql-hackers
On Mon, Aug 20, 2018 at 12:30:29PM +0900, Tatsuro Yamada wrote:
> vacuumlo:
>    Document
>      - Add long options
>      - Add environment section

Let's keep things simple by not adding long options where it is not
especially obvious, so I would suggest to keep the patch simple and just
add long options for connection options.

> oid2name:
>    Document
>      - Add long options
>      - Add environment section
>      - Remove deprecated and unhandled option "-P password"

Is this a good idea?  I doubt that it is used but keeping it would not
cause any breakage, and removing it could.

oid2name supports also PGDATABASE.

>    Code
>      - Revive handling "-H host" option silently
>
> I didn't add "-H" to the help message because it's a deprecated
> option.

It seems to me that this should be still documented in both --help and
in the docs, and that we should just mark it as deprecated in both.

> I guess that that means "silently" as you said on previous email.
> Should I add it?  For example,
>
> [...]

Let's use a different line for that.  See for example how pg_standby -k
is treated.

I can see why you have reordered the options, this is more consistent
with things in src/bin/scripts.

We could have as well some basic TAP tests for both utilities while on
it.  Something as simple as the first tests in 050_dropdb.pl would do a
fine first shot.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: simplehash.h comment
Next
From: Michael Paquier
Date:
Subject: Re: simplehash.h comment