@@ -959,8 +959,9 @@ postgresql://[2001:db8::1234]/database
959959 <para>
960960 The host component is interpreted as described for the parameter <xref
961961 linkend="libpq-connect-host"/>. In particular, a Unix-domain socket
962- connection is chosen if the host part is either empty or starts with a
963- slash, otherwise a TCP/IP connection is initiated. Note, however, that the
962+ connection is chosen if the host part is either empty or looks like an
963+ absolute path name,
964+ otherwise a TCP/IP connection is initiated. Note, however, that the
964965 slash is a reserved character in the hierarchical part of the URI. So, to
965966 specify a non-standard Unix-domain socket directory, either omit the host
966967 specification in the URI and specify the host as a parameter, or
@@ -1035,16 +1036,19 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
10351036 <term><literal>host</literal></term>
10361037 <listitem>
10371038 <para>
1038- Name of host to connect to.<indexterm><primary>host name</primary></indexterm>
1039- If a host name begins with a slash, it specifies Unix-domain
1040- communication rather than TCP/IP communication; the value is the
1041- name of the directory in which the socket file is stored.
1042- The default behavior when <literal>host</literal> is
1043- not specified, or is empty, is to connect to a Unix-domain
1039+ Name of host to connect to.<indexterm><primary>host
1040+ name</primary></indexterm> If a host name looks like an absolute path
1041+ name, it specifies Unix-domain communication rather than TCP/IP
1042+ communication; the value is the name of the directory in which the
1043+ socket file is stored. (On Unix, an absolute path name begins with a
1044+ slash. On Windows, paths starting with drive letters are also
1045+ recognized.) The default behavior when <literal>host</literal> is not
1046+ specified, or is empty, is to connect to a Unix-domain
10441047 socket<indexterm><primary>Unix domain socket</primary></indexterm> in
10451048 <filename>/tmp</filename> (or whatever socket directory was specified
1046- when <productname>PostgreSQL</productname> was built). On machines without
1047- Unix-domain sockets, the default is to connect to <literal>localhost</literal>.
1049+ when <productname>PostgreSQL</productname> was built). On Windows and
1050+ on machines without Unix-domain sockets, the default is to connect to
1051+ <literal>localhost</literal>.
10481052 </para>
10491053 <para>
10501054 A comma-separated list of host names is also accepted, in which case
@@ -1123,8 +1127,8 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
11231127 </para>
11241128 <para>
11251129 Without either a host name or host address,
1126- <application>libpq</application> will connect using a
1127- local Unix-domain socket; or on machines without Unix-domain
1130+ <application>libpq</application> will connect using a local
1131+ Unix-domain socket; or on Windows and on machines without Unix-domain
11281132 sockets, it will attempt to connect to <literal>localhost</literal>.
11291133 </para>
11301134 </listitem>
0 commit comments