Re: [HACKERS] PQhost may return socket dir for network connection - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] PQhost may return socket dir for network connection
Date
Msg-id 15728.1493654814@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] PQhost may return socket dir for network connection  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] PQhost may return socket dir for network connection  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Apr 28, 2017 at 3:43 AM, Kyotaro HORIGUCHI
> <horiguchi.kyotaro@lab.ntt.co.jp> wrote:
>> As the subject, PQhost() seems to be forgeting about the case
>> where only hostaddr is specified in a connection string.

> I suspect that may have been intentional.

See commits 11003eb55 and 40cb21f70 for recent history in this area.
Further back there's more history around host vs. hostaddr.  We've
gone back and forth on this in the past, including an ultimately
reverted attempt to add "PQhostaddr()", so it'd be a good idea to
study those past threads before proposing a change here.

Having said that, the behavior stated in $subject does sound wrong.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] scram and \password
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] snapbuild woes