branch: externals/pq
commit f743c450aceede364268b614f93cdb1b46e41c77
Author: Andreas Seltenreich <andreas+...@ansel.ydns.eu>
Commit: Andreas Seltenreich <andreas+...@ansel.ydns.eu>

    Set application_name.
---
 pq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pq.c b/pq.c
index 94f7d64f1f..40f7158dee 100644
--- a/pq.c
+++ b/pq.c
@@ -77,6 +77,9 @@ Fpq_connectdb (emacs_env *env, int nargs, emacs_value args[], 
void *data)
 
   /* The emacs-module interface always expects utf8 strings */
   PGresult *res = PQexec(conn, "set client_encoding to utf8");
+  if (!result_ok(env, res))
+    return Qnil;
+  res = PQexec(conn, "set application_name to emacs");
   if (!result_ok(env, res))
     return Qnil;
 

Reply via email to