Re: Postgres and --config-file option - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Postgres and --config-file option
Date
Msg-id CA+TgmoYaC=oXM6nvLpfzrJuD1pyOuZfpoaNLCcm8mWk8Hra6BQ@mail.gmail.com
Whole thread Raw
In response to Re: Postgres and --config-file option  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: Postgres and --config-file option
List pgsql-hackers
On Thu, May 16, 2024 at 4:57 AM Aleksander Alekseev
<aleksander@timescale.com> wrote:
> I propose my original v1 patch for correcting the --help output of
> 'postgres' too. I agree with the above comments that corresponding
> changes in v4 became somewhat unwieldy.

So, who is it exactly that will be confused by the status quo? I mean,
let's say you get this error:

postgres does not know where to find the server configuration file.
You must specify the --config-file or -D invocation option or set the
PGDATA environment variable.

As I see it, either you know how it works and just made a mistake this
time, or you are a beginner. If it's the former, the fact that the
error message doesn't mention every possible way of solving the
problem does not matter, because you already know how to fix your
mistake. If it's the latter, you don't need to know *every* way to fix
the problem. You just need to know *one* way to fix the problem. I
don't really understand why somebody would look at the existing
message and say "gosh, it didn't tell me that I could also use -c!".
If you already know that, don't you just ignore the hint and get busy
with fixing the problem?

If the reason that somebody is upset is because it's not technically
true to say that you *must* do one of those things, we could fix that
with "You must" -> "You can" or with "You must specify" -> "Specify".
The patch you propose is also not terrible or anything, but it goes in
the direction of listing every alternative, which will become
unpalatable as soon as somebody adds one more way to do it, or maybe
it's unpalatable already.

Even if we don't do that, I don't see that there's a huge problem here.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: "Greg Stark"
Date:
Subject: Re: Comments about TLS (no SSLRequest) and ALPN
Next
From: Tom Lane
Date:
Subject: Re: Postgres and --config-file option