aboutsummaryrefslogtreecommitdiff
path: root/src/common/jsonapi.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
commit1eeac95dc4a639c51ff6cc6e2ac6ae52dab32b32 (patch)
tree9b9cfe8ed3471748f4c3b8ce051a00606745b312 /src/common/jsonapi.c
parenta60b11327bbd4ae9f661563644a15b0c324f3d9d (diff)
downloadpostgresql-1eeac95dc4a639c51ff6cc6e2ac6ae52dab32b32.tar.gz
postgresql-1eeac95dc4a639c51ff6cc6e2ac6ae52dab32b32.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/common/jsonapi.c')
-rw-r--r--src/common/jsonapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/jsonapi.c b/src/common/jsonapi.c
index 98e4ef09426..90abe2687f4 100644
--- a/src/common/jsonapi.c
+++ b/src/common/jsonapi.c
@@ -1057,11 +1057,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)