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

Поиск
Список
Период
Сортировка
От Matthias van de Meent
Тема Re: doc: Fix description of how the default user name is chosen
Дата
Msg-id CAEze2Wg6g4-ri6zrN6iuE4_VCLUr3EvNLJS1sZpGmQus8VGrSg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: doc: Fix description of how the default user name is chosen  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: doc: Fix description of how the default user name is chosen  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
On Wed, 6 Jul 2022 at 02:43, David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Tue, Jul 5, 2022 at 5:20 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>
>> "David G. Johnston" <david.g.johnston@gmail.com> writes:
>> >     In passing, the authentication error examples use the phrase
>> >     "database user name" in a couple of locations.  The word
>> >     database in both cases is both unusual and unnecessary for
>> >     understanding.  The reference to user name means the one in/for the
>> >     database unless otherwise specified.
>>
>> I'm not convinced that just saying "user name" is an improvement.
>> The thing that we are trying to clarify in much of this section
>> is the relationship between your operating-system-assigned user
>> name and your database-cluster-assigned user name.  So just saying
>> "user name" adds an undesirable element of ambiguity.
>>
>>
>> Maybe we could change "database user name" to "Postgres user name"?
>
>
> I'm fine with just leaving "database user name" as no one seems to have the same qualm with it that I do.  Besides, I
justfinished reading:
 
>
> https://www.postgresql.org/docs/current/client-authentication.html
>
> and it seems pointless to leave that written as-is and gripe about the specific change I was recommending.

If we're going to change this anyway, could we replace 'user name'
with 'username' in the connection documentation? It irks me to see so
much 'user name' while our connection parameter is 'username', and we
use the username of the OS user, not the OS user's (display) name - or
at least, that's how it behaved under Linux last time I checked.

>>
>>
>> -    if you do not specify a database name, it defaults to the database
>> -    user name, which might or might not be the right thing.
>> +    if the database name shown matches the user name you are connecting
>> +    as it is not by accident: the default database name is the
>> +    user name.
>>
>> This does absolutely not seem like an improvement.
>
>
> In that case I don't see the need for any form of commentary beyond:
>
> "If you do not specify a database name it defaults to the database user name."

Agreed to both.
The right-ness of the default can either be systematic ("we should or
should not default to connection username instead of some other
default") or in context of connection establishment ("this connection
should or should not connect to the database named after the user's
username").
The right-ness of the systematic default doesn't matter in this
context (that's something to put in the comments of that code or
discuss on -hackers), and the right-ness of the contextual default was
already proven to be wrong in this configuration of server and client,
by the context of failing to connect to that defaulted database.

Kind regards,

Matthias van de Meent



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: pg15b2: large objects lost on upgrade
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: doc: Fix description of how the default user name is chosen