Using hostaddr> instead of host> allows the
application to avoid a host name look-up, which might be important
in applications with time constraints. However, a host name is
- required for Kerberos, GSSAPI, or SSPI authentication, as well as
- for full SSL certificate verification. The following rules are
- used:
- If host> is specified without hostaddr>,
- a host name lookup occurs.
- If hostaddr> is specified without host>,
- the value for hostaddr> gives the server network address.
- The connection attempt will fail in any of the cases where a
- host name is required.
- If both host> and hostaddr> are specified,
- the value for hostaddr> gives the server network address.
- The value for host> is ignored unless needed for
- authentication or verification purposes, in which case it will be
- used as the host name. Note that authentication is likely to fail
- if host> is not the name of the machine at
- hostaddr>.
+ required for Kerberos, GSSAPI, or SSPI authentication
+ methods, as well as for verify-full> SSL
+ certificate verification. The following rules are used:
+
+
+ If host> is specified without hostaddr>,
+ a host name lookup occurs.
+
+
+
+ If hostaddr> is specified without host>,
+ the value for hostaddr> gives the server network address.
+ The connection attempt will fail if the authentication
+ method requires a host name.
+
+
+
+ If both host> and hostaddr> are specified,
+ the value for hostaddr> gives the server network address.
+ The value for host> is ignored unless the
+ authentication method requires it, in which case it will be
+ used as the host name.
+
+
+
+ Note that authentication is likely to fail if host>
+ is not the name of the server at network address hostaddr>.
Also, note that host> rather than hostaddr>
is used to identify the connection in ~/.pgpass> (see
).