commit d8b40ae9b8f85efcee0344570ffd2e8d2da0f6be
parent 21ae4cc212bb47b62335f60d5bb384e6c3bc13e7
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 19 Mar 2017 10:55:14 +0100
reduce logging, improve compatibility with older postgres versions
Diffstat:
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -46,17 +46,14 @@
* @param conn SQL connection that was used
*/
#define BREAK_DB_ERR(result,conn) do { \
- char *err = PQresultVerboseErrorMessage (result, PQERRORS_VERBOSE, PQSHOW_CONTEXT_ALWAYS); \
GNUNET_break (0); \
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, \
- "Database failure: %s/%s/%s/%s/%s/%s", \
+ "Database failure: %s/%s/%s/%s/%s", \
PQresultErrorField (result, PG_DIAG_MESSAGE_PRIMARY), \
PQresultErrorField (result, PG_DIAG_MESSAGE_DETAIL), \
PQresultErrorMessage (result), \
PQresStatus (PQresultStatus (result)), \
- PQerrorMessage(conn), \
- err); \
- PQfreemem (err); \
+ PQerrorMessage(conn)); \
} while (0)