1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Replace errdetail("%s", ...) with errdetail_internal("%s", ...).

There may be some other places where we should use errdetail_internal,
but they'll have to be evaluated case-by-case.  This commit just hits
a bunch of places where invoking gettext is obviously a waste of cycles.
This commit is contained in:
Tom Lane
2011-07-16 14:21:12 -04:00
parent 3ee7c8710d
commit 1af37ec96d
12 changed files with 33 additions and 32 deletions

View File

@@ -2792,7 +2792,7 @@ exec_stmt_raise(PLpgSQL_execstate *estate, PLpgSQL_stmt_raise *stmt)
ereport(stmt->elog_level,
(err_code ? errcode(err_code) : 0,
errmsg_internal("%s", err_message),
(err_detail != NULL) ? errdetail("%s", err_detail) : 0,
(err_detail != NULL) ? errdetail_internal("%s", err_detail) : 0,
(err_hint != NULL) ? errhint("%s", err_hint) : 0));
estate->err_text = NULL; /* un-suppress... */

View File

@@ -4435,8 +4435,8 @@ PLy_elog(int elevel, const char *fmt,...)
PG_TRY();
{
ereport(elevel,
(errmsg("%s", primary ? primary : "no exception data"),
(detail) ? errdetail("%s", detail) : 0,
(errmsg_internal("%s", primary ? primary : "no exception data"),
(detail) ? errdetail_internal("%s", detail) : 0,
(tb_depth > 0 && tbmsg) ? errcontext("%s", tbmsg) : 0,
(hint) ? errhint("%s", hint) : 0,
(query) ? internalerrquery(query) : 0,