aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-03-19 10:55:14 +0100
committerChristian Grothoff <christian@grothoff.org>2017-03-19 10:55:14 +0100
commitd8b40ae9b8f85efcee0344570ffd2e8d2da0f6be (patch)
treee0710f83b4c84f5e9647bb616403f54f312dc852
parent21ae4cc212bb47b62335f60d5bb384e6c3bc13e7 (diff)
reduce logging, improve compatibility with older postgres versions
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 536a55881..1c93bb71c 100644
--- 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)