From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Invalid primary_slot_name triggers warnings in all processes on reload |
Date: | 2025-10-10 05:52:02 |
Message-ID: | CAHGQGwGCidRtvuLeRmopT78LMioQmKu4pOS=RW=Fp+6_V=5_XQ@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Oct 9, 2025 at 2:26 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> > Please note that since you're using already translated strings as
> > arguments, you must use errmsg_internal() and errhint_internal(), to
> > avoid doubly-translating these messages.
>
> I've updated the patch to use errmsg_internal() and errhint_internal().
> However, for GUCs, GUC_check_errdetail() and GUC_check_errhint() are
> still used - and since they also translate their input, we might need
> something like GUC_check_errdetail_internal() and
> GUC_check_errhint_internal() to avoid double translation. Thought?
> I haven't added those functions in the attached patch yet.
OK, I've implemented this and attached two patches.
0001 fixes the issue we've been discussing. It's mostly the same as
the previous version I posted.
0002 adds GUC_check_errmsg_internal(), GUC_check_errdetail_internal(),
and GUC_check_errhint_internal(). These work like their counterparts
(e.g., GUC_check_errmsg()) but skip translation. It also updates
the check hook for primary_slot_name to use these new functions
when handling already-translated error messages.
Regards,
--
Fujii Masao
Attachment | Content-Type | Size |
---|---|---|
v5-0002-Avoid-double-translation-of-messages-for-invalid-.patch | application/octet-stream | 5.0 KB |
v5-0001-Make-invalid-primary_slot_name-follow-standard-GU.patch | application/octet-stream | 6.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Sadhuprasad Patro | 2025-10-10 05:52:55 | Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions |
Previous Message | Chao Li | 2025-10-10 04:13:24 | Re: new environment variable INITDB_LOCALE_PROVIDER |