IPv6 cleanups - Mailing list pgsql-patches

From Bruce Momjian
Subject IPv6 cleanups
Date
Msg-id 200301062245.h06MjMM19863@candle.pha.pa.us
Whole thread Raw
List pgsql-patches
I have applied the attached patch to allow longer IPv6 addresss in libpq
'hostaddr' connection string.  This doesn't appear to affect any
backward compatibility because only a pointer is used in the pgconn
structure.

I also updated a comment and some of the docs.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: doc/src/sgml/libpq.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/libpq.sgml,v
retrieving revision 1.103
diff -c -c -r1.103 libpq.sgml
*** doc/src/sgml/libpq.sgml    13 Dec 2002 05:49:10 -0000    1.103
--- doc/src/sgml/libpq.sgml    6 Jan 2003 22:36:26 -0000
***************
*** 110,123 ****
       <listitem>
       <para>
        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
!       a nonzero-length string is specified, TCP/IP communication is used.
       </para>
       <para>
        Using <literal>hostaddr</> instead of host allows the application to avoid a host
        name look-up, which may be important in applications with time
        constraints. However, Kerberos authentication requires the host
!       name. The following therefore applies. If host 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
        used, this causes a reverse name query. If both host and <literal>hostaddr</> are
--- 110,124 ----
       <listitem>
       <para>
        IP address of host to connect to. This should be in standard
!       IPv4 address format, e.g. <literal>172.28.40.9</>.  If your machine
!       supports IPv6, you can also use those addresses. If a nonzero-length
!       string is specified, TCP/IP communication is used.
       </para>
       <para>
        Using <literal>hostaddr</> instead of host allows the application to avoid a host
        name look-up, which may be important in applications with time
        constraints. However, Kerberos authentication requires the host
!       name. The following therefore applies: If host 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
        used, this causes a reverse name query. If both host and <literal>hostaddr</> are
Index: src/interfaces/libpq/fe-connect.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/interfaces/libpq/fe-connect.c,v
retrieving revision 1.217
diff -c -c -r1.217 fe-connect.c
*** src/interfaces/libpq/fe-connect.c    6 Jan 2003 03:18:27 -0000    1.217
--- src/interfaces/libpq/fe-connect.c    6 Jan 2003 22:36:30 -0000
***************
*** 132,140 ****
      "Database-Host", "", 40},

      {"hostaddr", "PGHOSTADDR", NULL, NULL,
!     "Database-Host-IPv4-Address", "", 15},        /* Room for
!                                                  * abc.def.ghi.jkl */
!
      {"port", "PGPORT", DEF_PGPORT_STR, NULL,
      "Database-Port", "", 6},

--- 132,139 ----
      "Database-Host", "", 40},

      {"hostaddr", "PGHOSTADDR", NULL, NULL,
!     "Database-Host-IP-Address", "", 45},
!
      {"port", "PGPORT", DEF_PGPORT_STR, NULL,
      "Database-Port", "", 6},


pgsql-patches by date:

Previous
From: "Patric Bechtel"
Date:
Subject: New patch for streaming
Next
From: Giles Lean
Date:
Subject: Re: Fix for HP-UX shared library builds