@@ -959,8 +959,9 @@ postgresql://[2001:db8::1234]/database
959
959
<para>
960
960
The host component is interpreted as described for the parameter <xref
961
961
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
964
965
slash is a reserved character in the hierarchical part of the URI. So, to
965
966
specify a non-standard Unix-domain socket directory, either omit the host
966
967
specification in the URI and specify the host as a parameter, or
@@ -1035,16 +1036,19 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
1035
1036
<term><literal>host</literal></term>
1036
1037
<listitem>
1037
1038
<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
1044
1047
socket<indexterm><primary>Unix domain socket</primary></indexterm> in
1045
1048
<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>.
1048
1052
</para>
1049
1053
<para>
1050
1054
A comma-separated list of host names is also accepted, in which case
@@ -1123,8 +1127,8 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
1123
1127
</para>
1124
1128
<para>
1125
1129
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
1128
1132
sockets, it will attempt to connect to <literal>localhost</literal>.
1129
1133
</para>
1130
1134
</listitem>
0 commit comments