Re: Re: libpq host/hostaddr/conninfo inconsistencies
On 2019-Sep-10, Alvaro Herrera from 2ndQuadrant wrote: > I propose to settle this issue by applying "Robert's changes two and > three", which has been +1'd by two people already and I also accept > myself as improvement. I don't think any further changes are required. Applied, marked item committed. Thanks, -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: Re: libpq host/hostaddr/conninfo inconsistencies
I propose to settle this issue by applying "Robert's changes two and three", which has been +1'd by two people already and I also accept myself as improvement. I don't think any further changes are required. diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index c1d1b6b2db..7afe7bf68d 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -993,10 +993,14 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname your machine supports IPv6, you can also use those addresses. TCP/IP communication is always used when a nonempty string is specified for this parameter. +If this parameter is not specified, the value of host +will be looked up to find the corresponding IP address - or, if +host specifies an IP address, that value will be +used directly. -Using hostaddr instead of host allows the +Using hostaddr allows the application to avoid a host name look-up, which might be important in applications with time constraints. However, a host name is required for GSSAPI or SSPI authentication In absence of objections or better ideas, I'll get this pushed tomorrow. If Robert as patch author wants to push himself, I'm happy to stand aside. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: Re: libpq host/hostaddr/conninfo inconsistencies
On 2/22/19 9:44 PM, Fabien COELHO wrote: Hmmm, I do not buy the typing argument: "host" is actually for everything, including directories. I do not think that adding "hostdir" would be desirable. In any case, the existing doco never comes out and states either rule set in so many words. Maybe it should. Personally I like the second and third edit from Robert's patch, but not the first one. I'm having a hard time seeing why you would specify host *and* hostaddr as this seems to imply. I also agree with Fabien's comment that host can be a path -- it's really a path to a socket file, but it's certainly not a host name or IP address. Perhaps that should be called out explicitly. Regards, -- -David da...@pgmasters.net