aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonfuncs.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2022-09-28 17:14:53 +0200
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2022-09-28 17:14:53 +0200
commitf1e7f25b5aef2f3957aa4dbc5eda874871f693e0 (patch)
tree3699f3aa010fb3e348ddd461aa5b80f347a4ea24 /src/backend/utils/adt/jsonfuncs.c
parent9923764614a0a4e0e23f3455794d9c2ac0b1635d (diff)
downloadpostgresql-f1e7f25b5aef2f3957aa4dbc5eda874871f693e0.tar.gz
postgresql-f1e7f25b5aef2f3957aa4dbc5eda874871f693e0.zip
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.
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
-rw-r--r--src/backend/utils/adt/jsonfuncs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c
index 5fd54b64b56..0364765dc0e 100644
--- a/src/backend/utils/adt/jsonfuncs.c
+++ b/src/backend/utils/adt/jsonfuncs.c
@@ -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)));
}