From d84a7b290f866b3f16cbefb0fca31b69ebace98a Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Wed, 28 Sep 2022 17:14:53 +0200 Subject: Change some errdetail() to errdetail_internal() This prevents marking the argument string for translation for gettext, and it also prevents the given string (which is already translated) from being translated at runtime. Also, mark the strings used as arguments to check_rolespec_name for translation. Backpatch all the way back as appropriate. None of this is caught by any tests (necessarily so), so I verified it manually. --- src/common/jsonapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/jsonapi.c') diff --git a/src/common/jsonapi.c b/src/common/jsonapi.c index cfc025749cc..873357aa02e 100644 --- a/src/common/jsonapi.c +++ b/src/common/jsonapi.c @@ -1079,11 +1079,11 @@ extract_token(JsonLexContext *lex) } /* - * Construct a detail message for a JSON error. + * Construct an (already translated) detail message for a JSON error. * * Note that the error message generated by this routine may not be * palloc'd, making it unsafe for frontend code as there is no way to - * know if this can be safery pfree'd or not. + * know if this can be safely pfree'd or not. */ char * json_errdetail(JsonParseErrorType error, JsonLexContext *lex) -- cgit v1.2.3