> On Feb 28, 2021, at 1:57 AM, Paul Förster <paul.foers...@gmail.com> wrote:
> 
> Hi,
> 
> I'd like to propose a patch to psql --help output:
> 
> Currently it is:
> 
> Usage:
>  psql [OPTION]... [DBNAME [USERNAME]]
> 
> ...
> 
> Connection options:
>  -h, --host=HOSTNAME      database server host or socket directory (default: 
> "local socket")
>  -p, --port=PORT          database server port (default: "5432")
>  -U, --username=USERNAME  database user name (default: "paul")
>  -w, --no-password        never prompt for password
>  -W, --password           force password prompt (should happen automatically)
> 
> I'd like to change it to the following to reflect the psql ability to process 
> a service name or a PostgreSQL URI:
> 
> Usage:
>  psql [OPTION]... [DBNAME [USERNAME]|service|uri]
> 
> ...
> 
> Connection options:
>  -h, --host=HOSTNAME      database server host or socket directory (default: 
> "local socket")
>  -p, --port=PORT          database server port (default: "5432")
>  -U, --username=USERNAME  database user name (default: "paul")
>  -w, --no-password        never prompt for password
>  -W, --password           force password prompt (should happen automatically)
>  service=name             service name as definited in pg_service.conf

"definited" is a typo.

Should this say "as defined in pg_service.conf"?  That's the default, but the 
user might have $PGSERVICEFILE set to something else.  Perhaps you could borrow 
the wording of other options and use "(default: as defined in 
pg_service.conf)", or something like that, but of course being careful to still 
fit in the line length limit.

>  uri                      connection URI (postgresql://...)
> 
> ...
> 
> Attached is a patch for src/bin/psql/help.c for this. The file 
> doc/src/sgml/ref/psql-ref.sgml does not seem to need any changes for this.
> 
> Any thoughts on this?

Other client applications follow the same pattern as psql, so if this change 
were adopted, it should apply to all of them.

Your proposal seems like something that would have been posted to the list 
before, possibly multiple times.  Any chance you could dig up past 
conversations on this subject and post links here for context?

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





Reply via email to