Re: Brokenness in parsing of pg_hba.conf - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Brokenness in parsing of pg_hba.conf
Date
Msg-id 16734.1073458902@sss.pgh.pa.us
Whole thread Raw
In response to Re: Brokenness in parsing of pg_hba.conf  ("Alex J. Avriette" <alex@posixnap.net>)
List pgsql-hackers
"Alex J. Avriette" <alex@posixnap.net> writes:
> Given on both Solaris (my database server) and OpenBSD (the machine from
> which that manpage came from) I can connect to 127.1, I think you must
> be mistaken here. What made you think that it isn't supported?

AFAICT, our code simply hands the string off to a C library function ---
either getaddrinfo() or inet_aton() depending on what your platform has.
If it's not behaving the way you want, it's the fault of one of those
routines.

Just to verify, I changed "127.0.0.1" to "127.1" in my local pg_hba.conf
(this is on HPUX 10.20, which has inet_aton but not getaddrinfo), and
could still connect over localhost TCP ... then changed it to "127.2",
and could not connect.  So I don't believe there is anything in the PG
code that is discriminating against addresses written this way.

If you still think the problem is PG's and not your C library's, I
invite you to trace through the code and show where we're going wrong.
But right at the moment I don't believe this is our bug.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Alex J. Avriette"
Date:
Subject: Re: Brokenness in parsing of pg_hba.conf
Next
From: "Thomas Hallgren"
Date:
Subject: First release of Pl/Java now on Gborg