1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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.
This commit is contained in:
Alvaro Herrera
2022-09-28 17:14:53 +02:00
parent 7188b9b0fd
commit d84a7b290f
6 changed files with 12 additions and 12 deletions

View File

@ -615,13 +615,13 @@ json_ereport_error(JsonParseErrorType error, JsonLexContext *lex)
ereport(ERROR,
(errcode(ERRCODE_UNTRANSLATABLE_CHARACTER),
errmsg("unsupported Unicode escape sequence"),
errdetail("%s", json_errdetail(error, lex)),
errdetail_internal("%s", json_errdetail(error, lex)),
report_json_context(lex)));
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type %s", "json"),
errdetail("%s", json_errdetail(error, lex)),
errdetail_internal("%s", json_errdetail(error, lex)),
report_json_context(lex)));
}