Re: doc: Fix description of how the default user name is chosen

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: doc: Fix description of how the default user name is chosen
Дата
Msg-id CAKFQuwaMs4PWcNckEVkWB3bjzG89HT5_xrtP-wEbX1tWLPq41w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: doc: Fix description of how the default user name is chosen  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: doc: Fix description of how the default user name is chosen  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers


On Sat, Jul 9, 2022, 08:16 Bruce Momjian <bruce@momjian.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.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: doc: Fix description of how the default user name is chosen
Следующее
От: Tom Lane
Дата:
Сообщение: Re: automatically generating node support functions