aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
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
commit84f8e407f5d9d9c1262931ebe6a83bc90a2f635b (patch)
tree3ab9401a528ee72988b670808ed853fde4435b3d /src/backend/utils/adt
parent51976309450c58e79b46015223888db8f5c8159f (diff)
downloadpostgresql-84f8e407f5d9d9c1262931ebe6a83bc90a2f635b.tar.gz
postgresql-84f8e407f5d9d9c1262931ebe6a83bc90a2f635b.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')
-rw-r--r--src/backend/utils/adt/acl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 2273f1cde1b..409a59bc784 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -5323,7 +5323,7 @@ get_rolespec_name(const RoleSpec *role)
/*
* Given a RoleSpec, throw an error if the name is reserved, using detail_msg,
- * if provided.
+ * if provided (which must be already translated).
*
* If node is NULL, no error is thrown. If detail_msg is NULL then no detail
* message is provided.
@@ -5344,7 +5344,7 @@ check_rolespec_name(const RoleSpec *role, const char *detail_msg)
(errcode(ERRCODE_RESERVED_NAME),
errmsg("role name \"%s\" is reserved",
role->rolename),
- errdetail("%s", detail_msg)));
+ errdetail_internal("%s", detail_msg)));
else
ereport(ERROR,
(errcode(ERRCODE_RESERVED_NAME),