public inbox for [email protected]  
help / color / mirror / Atom feed
From: Chao Li <[email protected]>
To: Peter Smith <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Redundant/mis-use of _(x) gettext macro?
Date: Wed, 1 Apr 2026 11:57:00 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHut+Pvp7jYcaiZ3pXedXgLcWZWDBLXFUK05JtZpGv3Mj=UOjw@mail.gmail.com>
References: <CAHut+Pvp7jYcaiZ3pXedXgLcWZWDBLXFUK05JtZpGv3Mj=UOjw@mail.gmail.com>



> On Apr 1, 2026, at 11:48, Peter Smith <[email protected]> wrote:
> 
> Hi.
> 
> As originally reported [1] in the EXCEPT (TABLE ...) thread, I felt
> the _() gettext macro is mis-used when it contains nothing but a
> quoted format string.
> 
> AFAIK the purpose of using gettext (e.g. the "_(x)" macro) is for
> marking the string for i18n translation. But there's nothing even to
> translate here.

Indeed.

> 
> Only 2 examples were found like this. Granted, this is probably not
> very harmful, but IMO it's better to patch the mis-use to prevent it
> from propagating.

+1

> 
> PSA the patch for more details.
> 
> ======
> [1] https://www.postgresql.org/message-id/CAHut%2BPtVaOYVP1R0TOoNh5G9CUBurrP%3D6i7fJCdfWEZiqVCRvw%40mail...
> 
> Kind Regards,
> Peter Smith.
> Fujitsu Australia
> <v1-0001-misuse-of-gettext-macro.patch>

LGTM.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/









reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Redundant/mis-use of _(x) gettext macro?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox