Re: DOCS: Make the Server Application docs synopses more consistent

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: DOCS: Make the Server Application docs synopses more consistent
Date: 2025-03-13 03:17:49
Message-ID: CAKFQuwaAwC8pOr3L4CWh-JMUMtBXwGLKqT3OjYCkTg4uJSODyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, March 12, 2025, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
wrote:
>
>
> My take on this is that the presence of environment variables doesn’t
> impact whether a given CLI option is shown optional or mandatory. We are,
> in effect, communicating that “datadir” must be specified for this
> command. And then choosing one of the ways of specifying it. The reader
> can use the indicated short-form -D, the long-form —pgdata if it exists, or
> the DATADIR environment variable (this applies to any option, not just
> datadir) as they desire. In short, most/all of these should show “-D
> datadir” without [ ].
>

Expanding on this a bit. Write the synopsis as if no environment variables
are set.

Generally, if the application itself defines the default value do not list
the option in the primary synopsis entry at all. If the application takes
an option’s default value from the OS environment by a means other than an
optional environment variable then show the option in the primary synopsis
entry but mark it as optional.

Connection options can have their own rules; which means we don’t need to
be specifying -U and -d everywhere when we deal with client applications.
Though maybe we should?

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2025-03-13 03:48:34 Re: Add an option to skip loading missing publication to avoid logical replication failure
Previous Message David G. Johnston 2025-03-13 02:51:02 DOCS: Make the Server Application docs synopses more consistent