Use of term hostaddrs for multiple hostaddr values

Started by Michael Paquierabout 8 years ago8 messages
#1Michael Paquier
michael.paquier@gmail.com
1 attachment(s)

Hi all,

While looking at the documentation of libpq, I have noticed that the
term hostaddrs is used to qualify multiple values of hostaddr. This
looks incorrect to me, as this is not the name of a connection
parameter. Please find attached a patch to address this
inconsistency. One error message is also touched, impacting
translability.

Thanks,
--
Michael

Attachments:

libpq-hostaddrs.patchtext/plain; charset=us-asciiDownload
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 4e4645136c..f0a288cd3e 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -1010,8 +1010,8 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
        </para>
 
        <para>
-        A comma-separated list of <literal>hostaddrs</literal> is also accepted, in
-        which case each host in the list is tried in order. See
+        A comma-separated list of <literal>hostaddr</literal> values is also
+        accepted, in which case each host in the list is tried in order. See
         <xref linkend="libpq-multiple-hosts"/> for details.
        </para>
        <para>
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 8d543334ae..77eebb0ba1 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -972,7 +972,7 @@ connectOptions2(PGconn *conn)
 		{
 			conn->status = CONNECTION_BAD;
 			printfPQExpBuffer(&conn->errorMessage,
-							  libpq_gettext("could not match %d host names to %d hostaddrs\n"),
+							  libpq_gettext("could not match %d host names to %d hostaddr values\n"),
 							  count_comma_separated_elems(conn->pghost), conn->nconnhost);
 			return false;
 		}
#2Magnus Hagander
magnus@hagander.net
In reply to: Michael Paquier (#1)
Re: Use of term hostaddrs for multiple hostaddr values

On Tue, Jan 9, 2018 at 5:34 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:

Hi all,

While looking at the documentation of libpq, I have noticed that the
term hostaddrs is used to qualify multiple values of hostaddr. This
looks incorrect to me, as this is not the name of a connection
parameter. Please find attached a patch to address this
inconsistency. One error message is also touched, impacting
translability.

These are both clear bugs, and the docs one should definitely be both
applied and backpatched.

How much do we care about the error message when it comes to backpatching?
Maybe we should leave that one to 11 only, to avoid breaking that, as the
way it's written it's actually less wrong there.

Thoughts?

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;

#3Michael Paquier
michael.paquier@gmail.com
In reply to: Magnus Hagander (#2)
Re: Use of term hostaddrs for multiple hostaddr values

On Sat, Jan 20, 2018 at 08:30:43PM +0200, Magnus Hagander wrote:

On Tue, Jan 9, 2018 at 5:34 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:
These are both clear bugs, and the docs one should definitely be both
applied and backpatched.

How much do we care about the error message when it comes to backpatching?
Maybe we should leave that one to 11 only, to avoid breaking that, as the
way it's written it's actually less wrong there.

Thoughts?

Thanks for your input!

Applying the error message portion only on HEAD is a good plan, there is
no point to make the life of translaters unnecessary painful.
--
Michael

#4Peter Eisentraut
peter.eisentraut@2ndquadrant.com
In reply to: Michael Paquier (#3)
Re: Use of term hostaddrs for multiple hostaddr values

On 1/20/18 17:39, Michael Paquier wrote:

On Sat, Jan 20, 2018 at 08:30:43PM +0200, Magnus Hagander wrote:

On Tue, Jan 9, 2018 at 5:34 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:
These are both clear bugs, and the docs one should definitely be both
applied and backpatched.

How much do we care about the error message when it comes to backpatching?
Maybe we should leave that one to 11 only, to avoid breaking that, as the
way it's written it's actually less wrong there.

Thoughts?

Thanks for your input!

Applying the error message portion only on HEAD is a good plan, there is
no point to make the life of translaters unnecessary painful.

I would backpatch both. The updated error message is arguably easier to
translate.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#5Magnus Hagander
magnus@hagander.net
In reply to: Peter Eisentraut (#4)
Re: Use of term hostaddrs for multiple hostaddr values

On Sun, Jan 21, 2018 at 12:45 AM, Peter Eisentraut <
peter.eisentraut@2ndquadrant.com> wrote:

On 1/20/18 17:39, Michael Paquier wrote:

On Sat, Jan 20, 2018 at 08:30:43PM +0200, Magnus Hagander wrote:

On Tue, Jan 9, 2018 at 5:34 AM, Michael Paquier <

michael.paquier@gmail.com>

wrote:
These are both clear bugs, and the docs one should definitely be both
applied and backpatched.

How much do we care about the error message when it comes to

backpatching?

Maybe we should leave that one to 11 only, to avoid breaking that, as

the

way it's written it's actually less wrong there.

Thoughts?

Thanks for your input!

Applying the error message portion only on HEAD is a good plan, there is
no point to make the life of translaters unnecessary painful.

I would backpatch both. The updated error message is arguably easier to
translate.

Fair enough. And since you do the translation merging at least, I'll go
with that.

Thus, applied and backpatched to 10.

Thanks!

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;

#6Michael Paquier
michael.paquier@gmail.com
In reply to: Magnus Hagander (#5)
Re: Use of term hostaddrs for multiple hostaddr values

On Sun, Jan 21, 2018 at 02:44:43PM +0200, Magnus Hagander wrote:

Fair enough. And since you do the translation merging at least, I'll go
with that.

Thus, applied and backpatched to 10.

Thanks!

OK, thanks all!
--
Michael

#7Vasundhar Boddapati
bvasundhar@gmail.com
In reply to: Michael Paquier (#6)
Re: Use of term hostaddrs for multiple hostaddr values

I have gone through the comments, both look straight forward to go

#8Michael Paquier
michael@paquier.xyz
In reply to: Vasundhar Boddapati (#7)
Re: Use of term hostaddrs for multiple hostaddr values

On Mon, Feb 26, 2018 at 01:22:01PM +0000, Vasundhar Boddapati wrote:

I have gone through the comments, both look straight forward to go

Thanks for the input. Please note that this has been pushed already as
the following commit:
commit: 5c15a54e851ecdd2b53e6d6a84f8ec0802ffc3cb
author: Magnus Hagander <magnus@hagander.net>
date: Sun, 21 Jan 2018 13:41:52 +0100
Fix wording of "hostaddrs"
--
Michael