summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2005-09-13 11:27:45 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2005-09-13 11:27:45 +0000
commite08c430fcb3e31b94a5ec04f216a733611a37c56 (patch)
tree588115a864cadeb4514144ec57a5c82136dcd0ca /src
parent3ee512ff21f86ee2ea7067143b5f451089a00209 (diff)
Added extra information about errors to the PostgreSQL error string.
Diffstat (limited to 'src')
-rw-r--r--src/src/lookups/pgsql.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/src/lookups/pgsql.c b/src/src/lookups/pgsql.c
index 731790fd2..a4f396d74 100644
--- a/src/src/lookups/pgsql.c
+++ b/src/src/lookups/pgsql.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/lookups/pgsql.c,v 1.2 2005/01/04 10:00:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/lookups/pgsql.c,v 1.3 2005/09/13 11:27:45 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -285,8 +285,15 @@ else
break;
default:
+ /* This was the original code:
*errmsg = string_sprintf("PGSQL: query failed: %s\n",
PQresultErrorMessage(pg_result));
+ This was suggested by a user:
+ */
+
+ *errmsg = string_sprintf("PGSQL: query failed: %s (%s) (%s)\n",
+ PQresultErrorMessage(pg_result),
+ PQresStatus(PQresultStatus(pg_result)), query);
*defer_break = FALSE;
goto PGSQL_EXIT;
}