From e08c430fcb3e31b94a5ec04f216a733611a37c56 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Tue, 13 Sep 2005 11:27:45 +0000 Subject: Added extra information about errors to the PostgreSQL error string. --- src/src/lookups/pgsql.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3