On Mon, Nov 29, 2010 at 2:26 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> Merlin Moncure <mmonc...@gmail.com> writes:
>> How do you test this feature?
>
> Try src/tools/ifaddrs/test_ifaddrs.c.  I think the only usage in the
> core code is testing samehost/samenet matches in pg_hba.conf.

It looks like this is unfortunately more involved.  The test of my
adjustment above immediately failed with ENOENT, which you have to
expect on hpux apparently.   According to some googling (see:
http://cvsweb.netbsd.org/bsdweb.cgi/src/dist/bind/lib/isc/unix/Attic/ifiter_ioctl.c?rev=1.1.1.4.4.1&content-type=text/x-cvsweb-markup
and others), the long method returns ip6 addresses and the short
method returns ip4 addresses, and you have to do both on hpux always.

Forcing the short method, the test worked, I got the loopback and the
local address.  So we have a couple of options here: hacking the
foreach to use the short method on hpux is certainly better situation
than we have now, or fixing this 'properly', means refactoring this
file a bit and adding a configure test or leaning on an hpux macro.  I
have no way of testing the long form method I posed above -- does
anybody have an ipv6 hpux box?

merlin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to