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
This commit is contained in:
parent
af205152ef
commit
385da7306c
@ -2313,7 +2313,7 @@ FATAL: database "testdb" does not exist
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
The database you are trying to connect to does not exist. Note that
|
The database you are trying to connect to does not exist. Note that
|
||||||
if you do not specify a database name, it defaults to the database
|
if you do not specify a database name, it defaults to the database
|
||||||
user name, which might or might not be the right thing.
|
user name.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<tip>
|
<tip>
|
||||||
|
@ -646,23 +646,24 @@ EOF
|
|||||||
<application>psql</application> is a regular
|
<application>psql</application> is a regular
|
||||||
<productname>PostgreSQL</productname> client application. In order
|
<productname>PostgreSQL</productname> client application. In order
|
||||||
to connect to a database you need to know the name of your target
|
to connect to a database you need to know the name of your target
|
||||||
database, the host name and port number of the server, and what user
|
database, the host name and port number of the server, and what
|
||||||
name you want to connect as. <application>psql</application> can be
|
database user name you want to connect as. <application>psql</application>
|
||||||
told about those parameters via command line options, namely
|
can be told about those parameters via command line options, namely
|
||||||
<option>-d</option>, <option>-h</option>, <option>-p</option>, and
|
<option>-d</option>, <option>-h</option>, <option>-p</option>, and
|
||||||
<option>-U</option> respectively. If an argument is found that does
|
<option>-U</option> respectively. If an argument is found that does
|
||||||
not belong to any option it will be interpreted as the database name
|
not belong to any option it will be interpreted as the database name
|
||||||
(or the user name, if the database name is already given). Not all
|
(or the database user name, if the database name is already given). Not all
|
||||||
of these options are required; there are useful defaults. If you omit the host
|
of these options are required; there are useful defaults. If you omit the host
|
||||||
name, <application>psql</application> will connect via a Unix-domain socket
|
name, <application>psql</application> will connect via a Unix-domain socket
|
||||||
to a server on the local host, or via TCP/IP to <literal>localhost</literal> on
|
to a server on the local host, or via TCP/IP to <literal>localhost</literal> on
|
||||||
Windows. The default port number is
|
Windows. The default port number is
|
||||||
determined at compile time.
|
determined at compile time.
|
||||||
Since the database server uses the same default, you will not have
|
Since the database server uses the same default, you will not have
|
||||||
to specify the port in most cases. The default user name is your
|
to specify the port in most cases. The default database user name is your
|
||||||
operating-system user name, as is the default database name.
|
operating-system user name. Once the database user name is determined, it
|
||||||
|
is used as the default database name.
|
||||||
Note that you cannot
|
Note that you cannot
|
||||||
just connect to any database under any user name. Your database
|
just connect to any database under any database user name. Your database
|
||||||
administrator should have informed you about your access rights.
|
administrator should have informed you about your access rights.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user