-/* $Cambridge: exim/src/src/lookups/pgsql.c,v 1.1 2004/10/07 13:10:01 ph10 Exp $ */
+/* $Cambridge: exim/src/src/lookups/pgsql.c,v 1.4 2006/02/07 11:19:01 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 2004 */
+/* Copyright (c) University of Cambridge 1995 - 2006 */
/* See the file NOTICE for conditions of use and distribution. */
/* Thanks to Petr Cech for contributing the original code for these
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;
}