From: | Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> |
---|---|
To: | Paul Förster <paul(dot)foerster(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: proposal: psql –help reflecting service or URI usage |
Date: | 2021-02-28 16:54:06 |
Message-ID: | 4063C945-0D38-4131-9943-7C96B8959E75@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On Feb 28, 2021, at 1:57 AM, Paul Förster <paul(dot)foerster(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Förster | 2021-02-28 18:10:14 | Re: proposal: psql –help reflecting service or URI usage |
Previous Message | Joel Jacobson | 2021-02-28 11:15:51 | Re: regexp_positions() |