reduce logging, improve compatibility with older postgres versions
This commit is contained in:
parent
21ae4cc212
commit
d8b40ae9b8
@ -46,17 +46,14 @@
|
|||||||
* @param conn SQL connection that was used
|
* @param conn SQL connection that was used
|
||||||
*/
|
*/
|
||||||
#define BREAK_DB_ERR(result,conn) do { \
|
#define BREAK_DB_ERR(result,conn) do { \
|
||||||
char *err = PQresultVerboseErrorMessage (result, PQERRORS_VERBOSE, PQSHOW_CONTEXT_ALWAYS); \
|
|
||||||
GNUNET_break (0); \
|
GNUNET_break (0); \
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, \
|
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_PRIMARY), \
|
||||||
PQresultErrorField (result, PG_DIAG_MESSAGE_DETAIL), \
|
PQresultErrorField (result, PG_DIAG_MESSAGE_DETAIL), \
|
||||||
PQresultErrorMessage (result), \
|
PQresultErrorMessage (result), \
|
||||||
PQresStatus (PQresultStatus (result)), \
|
PQresStatus (PQresultStatus (result)), \
|
||||||
PQerrorMessage(conn), \
|
PQerrorMessage(conn)); \
|
||||||
err); \
|
|
||||||
PQfreemem (err); \
|
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user