ph10 2005/09/13 12:27:45 BST
Modified files:
exim-doc/doc-txt ChangeLog
exim-src/src/lookups pgsql.c
Log:
Added extra information about errors to the PostgreSQL error string.
Revision Changes Path
1.228 +2 -0 exim/exim-doc/doc-txt/ChangeLog
1.3 +7 -0 exim/exim-src/src/lookups/pgsql.c
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.227
retrieving revision 1.228
diff -u -r1.227 -r1.228
--- ChangeLog 13 Sep 2005 11:13:27 -0000 1.227
+++ ChangeLog 13 Sep 2005 11:27:45 -0000 1.228
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.227 2005/09/13 11:13:27 ph10 Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.228 2005/09/13 11:27:45 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -180,6 +180,8 @@
the ratelimit ACL was added.
PH/45 Added $smtp_command for the full command (cf $smtp_command_argument).
+
+PH/46 Added extra information about PostgreSQL errors to the error string.
Exim version 4.52
Index: pgsql.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/lookups/pgsql.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- pgsql.c 4 Jan 2005 10:00:44 -0000 1.2
+++ pgsql.c 13 Sep 2005 11:27:45 -0000 1.3
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/lookups/pgsql.c,v 1.2 2005/01/04 10:00:44 ph10 Exp $ */
+/* $Cambridge: exim/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 @@
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;
}