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:
@ -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,
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user