summaryrefslogtreecommitdiff
path: root/contrib/dblink
diff options
context:
space:
mode:
authorTom Lane2011-07-16 18:21:12 +0000
committerTom Lane2011-07-16 18:22:18 +0000
commit1af37ec96d97722aeb527f5f43d6f6f2304f0861 (patch)
treec62658c6f2b199c9a38489b91053f9a17f070a1b /contrib/dblink
parent3ee7c8710defb63490d90cfff09a773d764aa05d (diff)
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.
Diffstat (limited to 'contrib/dblink')
-rw-r--r--contrib/dblink/dblink.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index 76617e3f36..3963329655 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -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.",