Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 385da73

Browse files
committed
doc: Fix description of how the default user name is chosen
This makes the distinction between operating-system user name and database user name a bit clearer. It also clarifies that the user name is determined first, and then the default database name. Author: David G. Johnston <david.g.johnston@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/CAKFQuwZUhgz=sUi+wGQV-PBTNjMovuA-BOV88RV-Vw0m0drCAg@mail.gmail.com
1 parent af20515 commit 385da73

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

doc/src/sgml/client-auth.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2313,7 +2313,7 @@ FATAL: database "testdb" does not exist
23132313
</programlisting>
23142314
The database you are trying to connect to does not exist. Note that
23152315
if you do not specify a database name, it defaults to the database
2316-
user name, which might or might not be the right thing.
2316+
user name.
23172317
</para>
23182318

23192319
<tip>

doc/src/sgml/ref/psql-ref.sgml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -646,23 +646,24 @@ EOF
646646
<application>psql</application> is a regular
647647
<productname>PostgreSQL</productname> client application. In order
648648
to connect to a database you need to know the name of your target
649-
database, the host name and port number of the server, and what user
650-
name you want to connect as. <application>psql</application> can be
651-
told about those parameters via command line options, namely
649+
database, the host name and port number of the server, and what
650+
database user name you want to connect as. <application>psql</application>
651+
can be told about those parameters via command line options, namely
652652
<option>-d</option>, <option>-h</option>, <option>-p</option>, and
653653
<option>-U</option> respectively. If an argument is found that does
654654
not belong to any option it will be interpreted as the database name
655-
(or the user name, if the database name is already given). Not all
655+
(or the database user name, if the database name is already given). Not all
656656
of these options are required; there are useful defaults. If you omit the host
657657
name, <application>psql</application> will connect via a Unix-domain socket
658658
to a server on the local host, or via TCP/IP to <literal>localhost</literal> on
659659
Windows. The default port number is
660660
determined at compile time.
661661
Since the database server uses the same default, you will not have
662-
to specify the port in most cases. The default user name is your
663-
operating-system user name, as is the default database name.
662+
to specify the port in most cases. The default database user name is your
663+
operating-system user name. Once the database user name is determined, it
664+
is used as the default database name.
664665
Note that you cannot
665-
just connect to any database under any user name. Your database
666+
just connect to any database under any database user name. Your database
666667
administrator should have informed you about your access rights.
667668
</para>
668669

0 commit comments

Comments
 (0)