Re: Re: libpq host/hostaddr/conninfo inconsistencies

From: Alvaro Herrera from 2ndQuadrant <alvherre(at)alvh(dot)no-ip(dot)org>
To: David Steele <david(at)pgmasters(dot)net>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Re: libpq host/hostaddr/conninfo inconsistencies
Date: 2019-09-10 17:34:42
Message-ID: 20190910173442.GA7694@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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 <literal>host</literal>
+ will be looked up to find the corresponding IP address - or, if
+ <literal>host</literal> specifies an IP address, that value will be
+ used directly.

- Using <literal>hostaddr</literal> instead of <literal>host</literal> allows the
+ Using <literal>hostaddr</literal> 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

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera from 2ndQuadrant 2019-09-10 17:42:32 Re: unlogged sequences
Previous Message Tom Lane 2019-09-10 17:26:42 Re: another look at macOS SIP