Docs for psql regarding default database name are incorrect
Docs for psql regarding default database name are incorrect
От:
"David G. Johnston" <david.g.johnston@gmail.com>
Дата:
The documentation for psql saith:
The default user name is your operating-system user name, as is the default database name.
The default database name is the same as the user name chosen for the connection attempt. Thus if one does "postgres~ psql -U davidj" the attempted database name will be davidj, not postgres even though the latter is the operating-system user name in effect.
The documentation for -U doesn't mention this changing of the attempted connect-to database. It is not possible to specify a user name without a database name explicitly given for psql unless one uses -U.
Thus at minimum the above needs to read:
The default user name is your operating-system user name. The default database name is the same as the resolved PostgreSQL user name.
Maybe change the description for -U:
"...of course)." This also changes the default database name.
The parameter dbname in libpq got the memo:
The database name. Defaults to be the same as the user name.
David J.
Re: Docs for psql regarding default database name are incorrect
On Sun, Mar 13, 2022 at 5:15 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
The documentation for psql saith:The default user name is your operating-system user name, as is the default database name.The default database name is the same as the user name chosen for the connection attempt.
Concretely, as attached.
I found a related reference in the authentication problems section that I tweaked as well.
David J.