diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-09-13 11:27:45 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-09-13 11:27:45 +0000 |
commit | e08c430fcb3e31b94a5ec04f216a733611a37c56 (patch) | |
tree | 588115a864cadeb4514144ec57a5c82136dcd0ca | |
parent | 3ee512ff21f86ee2ea7067143b5f451089a00209 (diff) |
Added extra information about errors to the PostgreSQL error string.
-rw-r--r-- | doc/doc-txt/ChangeLog | 4 | ||||
-rw-r--r-- | src/src/lookups/pgsql.c | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 6444b330e..1338d3d63 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.227 2005/09/13 11:13:27 ph10 Exp $ +$Cambridge: 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 ------------------------------------------- @@ -181,6 +181,8 @@ TF/01 Add missing LIBS=-lm to OS/Makefile-OpenBSD which was overlooked when 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 ----------------- 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; } |