Remove translation marker from libpq-be-fe-helpers.h. master github/master
authorFujii Masao <fujii@postgresql.org>
Tue, 22 Jul 2025 13:08:36 +0000 (22:08 +0900)
committerFujii Masao <fujii@postgresql.org>
Tue, 22 Jul 2025 13:08:36 +0000 (22:08 +0900)
Commit 112faf1378e introduced a translation marker in libpq-be-fe-helpers.h,
but this caused build failures on some platforms—such as the one reported
by buildfarm member indri—due to linker issues with dblink. This is the same
problem previously addressed in commit 213c959a294.

To fix the issue, this commit removes the translation marker from
libpq-be-fe-helpers.h, following the approach used in 213c959a294.
It also removes the associated gettext_noop() calls added in commit
112faf1378e, as they are no longer needed.

While reviewing this, a gettext_noop() call was also found in
contrib/basic_archive. Since contrib modules don't support translation,
this call has been removed as well.

Per buildfarm member indri.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: http://postgr.es/m/0e6299d9-608a-4ffa-aeb1-40cb8a99000b@oss.nttdata.com

contrib/basic_archive/basic_archive.c
contrib/dblink/dblink.c
contrib/postgres_fdw/connection.c
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/include/libpq/libpq-be-fe-helpers.h

index 4a8b8c7ac29c1d2afa75020d7744a47ce1ce83b6..8fc633d2cbf62e1505cc13d06fc0133f46886171 100644 (file)
@@ -65,7 +65,7 @@ void
 _PG_init(void)
 {
    DefineCustomStringVariable("basic_archive.archive_directory",
-                              gettext_noop("Archive file destination directory."),
+                              "Archive file destination directory.",
                               NULL,
                               &archive_directory,
                               "",
index c459a842fa95e69e7e76f1f4f38d874046784157..de5bed282f3f0037a2c9b16a0831daf8fdb7ecbb 100644 (file)
@@ -242,7 +242,7 @@ dblink_get_conn(char *conname_or_str,
        }
 
        PQsetNoticeReceiver(conn, libpqsrv_notice_receiver,
-                           gettext_noop("received message via remote connection"));
+                           "received message via remote connection");
 
        dblink_security_check(conn, NULL, connstr);
        if (PQclientEncoding(conn) != GetDatabaseEncoding())
@@ -343,7 +343,7 @@ dblink_connect(PG_FUNCTION_ARGS)
    }
 
    PQsetNoticeReceiver(conn, libpqsrv_notice_receiver,
-                       gettext_noop("received message via remote connection"));
+                       "received message via remote connection");
 
    /* check password actually used if not superuser */
    dblink_security_check(conn, connname, connstr);
index e41d47c3bbd1ab3e07bc7319fb82cfbcbca3cdb3..c1ce6f334366549a759e0fe9fd81db9fe7bfeee3 100644 (file)
@@ -626,7 +626,7 @@ connect_pg_server(ForeignServer *server, UserMapping *user)
                     errdetail_internal("%s", pchomp(PQerrorMessage(conn)))));
 
        PQsetNoticeReceiver(conn, libpqsrv_notice_receiver,
-                           gettext_noop("received message via remote connection"));
+                           "received message via remote connection");
 
        /* Perform post-connection security checks. */
        pgfdw_security_check(keywords, values, user, conn);
index 0c75fe064d5ec973ff6621359d7a97170e626d3c..886d99951dddfa79fc8001ba3f4d4844c1218211 100644 (file)
@@ -233,7 +233,7 @@ libpqrcv_connect(const char *conninfo, bool replication, bool logical,
    }
 
    PQsetNoticeReceiver(conn->streamConn, libpqsrv_notice_receiver,
-                       gettext_noop("received message via replication"));
+                       "received message via replication");
 
    /*
     * Set always-secure search path for the cases where the connection is
index 49137a0a5706aeb80846423bc54d6a59a0b5dbcd..af13bd6bf3da3bb3faf5297d96f4390fd8a0e591 100644 (file)
@@ -481,7 +481,7 @@ libpqsrv_notice_receiver(void *arg, const PGresult *res)
        len--;
 
    ereport(LOG,
-           errmsg_internal("%s: %.*s", _(prefix), len, message));
+           errmsg_internal("%s: %.*s", prefix, len, message));
 }
 
 #endif                         /* LIBPQ_BE_FE_HELPERS_H */