Re: [HACKERS] PQhost may return socket dir for network connection

2017-05-09 Thread Kyotaro HORIGUCHI
At Mon, 1 May 2017 15:48:17 -0400, Robert Haas wrote in > On Mon, May 1, 2017 at 1:36 PM, Tom Lane wrote: > > Robert Haas writes: > >> On Mon, May 1, 2017 at 12:06 PM, Tom Lane wrote: > >>> Having said that, the behavior stated in $subject does sound wrong. > > > >> I'm not sure. My understa

Re: [HACKERS] PQhost may return socket dir for network connection

2017-05-01 Thread Robert Haas
On Mon, May 1, 2017 at 1:36 PM, Tom Lane wrote: > Robert Haas writes: >> On Mon, May 1, 2017 at 12:06 PM, Tom Lane wrote: >>> Having said that, the behavior stated in $subject does sound wrong. > >> I'm not sure. My understanding of the relationship between host and >> hostaddr is that hostaddr

Re: [HACKERS] PQhost may return socket dir for network connection

2017-05-01 Thread Tom Lane
Robert Haas writes: > On Mon, May 1, 2017 at 12:06 PM, Tom Lane wrote: >> Having said that, the behavior stated in $subject does sound wrong. > I'm not sure. My understanding of the relationship between host and > hostaddr is that hostaddr overrides our notion of where to find host, > but not o

Re: [HACKERS] PQhost may return socket dir for network connection

2017-05-01 Thread Robert Haas
On Mon, May 1, 2017 at 12:06 PM, Tom Lane wrote: > Robert Haas writes: >> On Fri, Apr 28, 2017 at 3:43 AM, Kyotaro HORIGUCHI >> 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

Re: [HACKERS] PQhost may return socket dir for network connection

2017-05-01 Thread Tom Lane
Robert Haas writes: > On Fri, Apr 28, 2017 at 3:43 AM, Kyotaro HORIGUCHI > 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 rece

Re: [HACKERS] PQhost may return socket dir for network connection

2017-05-01 Thread Robert Haas
On Fri, Apr 28, 2017 at 3:43 AM, Kyotaro HORIGUCHI 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. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise

[HACKERS] PQhost may return socket dir for network connection

2017-04-28 Thread Kyotaro HORIGUCHI
Hello. As the subject, PQhost() seems to be forgeting about the case where only hostaddr is specified in a connection string. PQhost() returns /var/run/postgresql or such for a connection made from the connection string "hostaddr=127.0.0.1 port=5432 dbname=postgres". I don't believe this behavior