1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +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

@ -188,7 +188,7 @@ typedef struct remoteConnHashEnt
ereport(ERROR, \
(errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION), \
errmsg("could not establish connection"), \
errdetail("%s", msg))); \
errdetail_internal("%s", msg))); \
} \
dblink_security_check(conn, rconn); \
PQsetClientEncoding(conn, GetDatabaseEncodingName()); \
@ -264,7 +264,7 @@ dblink_connect(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION),
errmsg("could not establish connection"),
errdetail("%s", msg)));
errdetail_internal("%s", msg)));
}
/* check password actually used if not superuser */
@ -2262,8 +2262,9 @@ dblink_res_error(const char *conname, PGresult *res, const char *dblink_context_
ereport(level,
(errcode(sqlstate),
message_primary ? errmsg("%s", message_primary) : errmsg("unknown error"),
message_detail ? errdetail("%s", message_detail) : 0,
message_primary ? errmsg_internal("%s", message_primary) :
errmsg("unknown error"),
message_detail ? errdetail_internal("%s", message_detail) : 0,
message_hint ? errhint("%s", message_hint) : 0,
message_context ? errcontext("%s", message_context) : 0,
errcontext("Error occurred on dblink connection named \"%s\": %s.",