Thread: Incorrect translator comment for ListenServerPort()?

Incorrect translator comment for ListenServerPort()?

From
Japin Li
Date:
Hi, all

When I read the ListenServerPort(), I noticed two incorrect translator
implementations: 1) the translator for setsockopt(SO_REUSEADDR), which
should not be "Unix"; 2) the translator for setsockopt(IPV6_V6ONLY),
which is applicable only to IPv6.

diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index 1bf27d93cfa..9f58e4c4e39 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -571,7 +571,7 @@ ListenServerPort(int family, const char *hostName, unsigned short portNumber,
             {
                 ereport(LOG,
                         (errcode_for_socket_access(),
-                /* translator: third %s is IPv4, IPv6, or Unix */
+                /* translator: third %s is IPv4 or IPv6 */
                          errmsg("%s(%s) failed for %s address \"%s\": %m",
                                 "setsockopt", "SO_REUSEADDR",
                                 familyDesc, addrDesc)));
@@ -589,7 +589,7 @@ ListenServerPort(int family, const char *hostName, unsigned short portNumber,
             {
                 ereport(LOG,
                         (errcode_for_socket_access(),
-                /* translator: third %s is IPv4, IPv6, or Unix */
+                /* translator: third %s is IPv6 */
                          errmsg("%s(%s) failed for %s address \"%s\": %m",
                                 "setsockopt", "IPV6_V6ONLY",
                                 familyDesc, addrDesc)));

-- 
Regrads,
Japin Li



Re: Incorrect translator comment for ListenServerPort()?

From
Daniel Gustafsson
Date:
> On 17 Feb 2025, at 15:39, Japin Li <japinli@hotmail.com> wrote:

> When I read the ListenServerPort(), I noticed two incorrect translator
> implementations: 1) the translator for setsockopt(SO_REUSEADDR), which
> should not be "Unix"; 2) the translator for setsockopt(IPV6_V6ONLY),
> which is applicable only to IPv6.

Nice catches, I agree with your conclusions. I'll apply these in a bit.

--
Daniel Gustafsson




Re: Incorrect translator comment for ListenServerPort()?

From
Japin Li
Date:
On Mon, 17 Feb 2025 at 15:45, Daniel Gustafsson <daniel@yesql.se> wrote:
>> On 17 Feb 2025, at 15:39, Japin Li <japinli@hotmail.com> wrote:
>
>> When I read the ListenServerPort(), I noticed two incorrect translator
>> implementations: 1) the translator for setsockopt(SO_REUSEADDR), which
>> should not be "Unix"; 2) the translator for setsockopt(IPV6_V6ONLY),
>> which is applicable only to IPv6.
>
> Nice catches, I agree with your conclusions. I'll apply these in a bit.
>

Thanks for your quick review.

-- 
Regrads,
Japin Li