1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +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 a60b11327b
commit 1eeac95dc4
6 changed files with 12 additions and 12 deletions

View File

@ -580,7 +580,7 @@ check_simple_rowfilter_expr_walker(Node *node, ParseState *pstate)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("invalid publication WHERE expression"),
errdetail("%s", errdetail_msg),
errdetail_internal("%s", errdetail_msg),
parser_errposition(pstate, exprLocation(node))));
return expression_tree_walker(node, check_simple_rowfilter_expr_walker,

View File

@ -521,7 +521,7 @@ AlterRole(ParseState *pstate, AlterRoleStmt *stmt)
Oid roleid;
check_rolespec_name(stmt->role,
"Cannot alter reserved roles.");
_("Cannot alter reserved roles."));
/* Extract options from the statement node tree */
foreach(option, stmt->options)
@ -835,7 +835,7 @@ AlterRoleSet(AlterRoleSetStmt *stmt)
if (stmt->role)
{
check_rolespec_name(stmt->role,
"Cannot alter reserved roles.");
_("Cannot alter reserved roles."));
roletuple = get_rolespec_tuple(stmt->role);
roleform = (Form_pg_authid) GETSTRUCT(roletuple);