| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Redundant/mis-use of _(x) gettext macro? |
| Date: | 2026-04-01 03:57:00 |
| Message-ID: | CE92DB56-4C12-4967-876C-CE2D79C98C67@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Apr 1, 2026, at 11:48, Peter Smith <smithpb2250(at)gmail(dot)com> 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.gmail.com
>
> 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/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Suraj Kharage | 2026-04-01 04:28:20 | Re: [PATCH] Add support for INSERT ... SET syntax |
| Previous Message | Peter Smith | 2026-04-01 03:55:53 | Re: Skipping schema changes in publication |