1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +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

@ -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)