Commit c9cf9820 authored by Bruce Momjian's avatar Bruce Momjian

Enable IPv6 libpq 'hostaddr' addresses. Update docs.

parent 939a59ff
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.103 2002/12/13 05:49:10 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.104 2003/01/06 22:48:16 momjian Exp $
--> -->
<chapter id="libpq"> <chapter id="libpq">
...@@ -110,14 +110,15 @@ PGconn *PQconnectdb(const char *conninfo) ...@@ -110,14 +110,15 @@ PGconn *PQconnectdb(const char *conninfo)
<listitem> <listitem>
<para> <para>
IP address of host to connect to. This should be in standard IP address of host to connect to. This should be in standard
numbers-and-dots form, as used by the BSD functions <function>inet_aton</> et al. If IPv4 address format, e.g. <literal>172.28.40.9</>. If your machine
a nonzero-length string is specified, TCP/IP communication is used. supports IPv6, you can also use those addresses. If a nonzero-length
string is specified, TCP/IP communication is used.
</para> </para>
<para> <para>
Using <literal>hostaddr</> instead of host allows the application to avoid a host Using <literal>hostaddr</> instead of host allows the application to avoid a host
name look-up, which may be important in applications with time name look-up, which may be important in applications with time
constraints. However, Kerberos authentication requires the host constraints. However, Kerberos authentication requires the host
name. The following therefore applies. If host is specified without name. The following therefore applies: If host is specified without
<literal>hostaddr</>, a host name lookup is forced. If <literal>hostaddr</> is specified without <literal>hostaddr</>, a host name lookup is forced. If <literal>hostaddr</> is specified without
host, the value for <literal>hostaddr</> gives the remote address; if Kerberos is host, the value for <literal>hostaddr</> gives the remote address; if Kerberos is
used, this causes a reverse name query. If both host and <literal>hostaddr</> are used, this causes a reverse name query. If both host and <literal>hostaddr</> are
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.217 2003/01/06 03:18:27 momjian Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.218 2003/01/06 22:48:16 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -132,9 +132,8 @@ static const PQconninfoOption PQconninfoOptions[] = { ...@@ -132,9 +132,8 @@ static const PQconninfoOption PQconninfoOptions[] = {
"Database-Host", "", 40}, "Database-Host", "", 40},
{"hostaddr", "PGHOSTADDR", NULL, NULL, {"hostaddr", "PGHOSTADDR", NULL, NULL,
"Database-Host-IPv4-Address", "", 15}, /* Room for "Database-Host-IP-Address", "", 45},
* abc.def.ghi.jkl */
{"port", "PGPORT", DEF_PGPORT_STR, NULL, {"port", "PGPORT", DEF_PGPORT_STR, NULL,
"Database-Port", "", 6}, "Database-Port", "", 6},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment