From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: Fix description of how the default user name is chosen |
Date: | 2022-07-09 15:52:46 |
Message-ID: | CAKFQuwaMs4PWcNckEVkWB3bjzG89HT5_xrtP-wEbX1tWLPq41w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Jul 9, 2022, 08:16 Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> On Sat, Jul 9, 2022 at 08:06:21AM -0700, David G. Johnston wrote:
> > Maybe invoke the wording from the libpq docs and say:
> >
> > The default database name is the same as the user connection parameter.
> >
> >
> https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
> >
> > That page doesn’t feel the need to qualify user name and I don’t think
> it hurts
> > comprehension; and the writing “user parameter” there, instead of “user
> name”,
> > since the parameter is simply “user”, not “username”.
>
> Well, it could be the login OS name if the user connection parameter is
> unspecified, right?
>
>
No. It is always the user parameter. It just so happens that parameter
also has a default. And so while there is a transitive aspect the
resolution of the user parameter happens first, using the OS user if
needed, then the dbname parameter is resolved using the user parameter if
needed to supply the default.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-07-09 16:58:50 | Re: automatically generating node support functions |
Previous Message | Bruce Momjian | 2022-07-09 15:15:58 | Re: doc: Fix description of how the default user name is chosen |