diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-06-27 16:09:29 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-06-27 16:09:29 +0200 |
commit | 7cbda831aec8525fd7a02ad9495904486f80b1a6 (patch) | |
tree | 5adafc0df57cbdba463aea555ef3a2af85c41eea /src/backenddb | |
parent | 90cf9243dd806f2c36eea0439b75cb653b0a1b35 (diff) |
remove dead macros
Diffstat (limited to 'src/backenddb')
-rw-r--r-- | src/backenddb/plugin_merchantdb_postgres.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index 827891ce..084d0421 100644 --- a/src/backenddb/plugin_merchantdb_postgres.c +++ b/src/backenddb/plugin_merchantdb_postgres.c @@ -43,66 +43,6 @@ struct PostgresClosure }; -/** - * Error code returned by Postgres for deadlock. - * FIXME: no threads, really needed? - */ -#define PQ_DIAG_SQLSTATE_DEADLOCK "40P01" - -/** - * Error code returned by Postgres on serialization failure. - */ -#define PQ_DIAG_SQLSTATE_SERIALIZATION_FAILURE "40001" - -/** - * Extract error code. - * - * @param res postgres result object with error details - */ -#define EXTRACT_DB_ERROR(res) \ - PQresultErrorField(res, PG_DIAG_SQLSTATE) - -/** - * Log a query error. - * - * @param result PQ result object of the query that failed - * @param conn SQL connection that was used - */ -#define QUERY_ERR(result,conn) \ - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, \ - "Query failed at %s:%u: %s/%s/%s/%s/%s\n", \ - __FILE__, __LINE__, \ - PQresultErrorField (result, PG_DIAG_MESSAGE_PRIMARY), \ - PQresultErrorField (result, PG_DIAG_MESSAGE_DETAIL), \ - PQresultErrorMessage (result), \ - PQresStatus (PQresultStatus (result)), \ - PQerrorMessage (conn)); - -/** - * Log error from PostGres. - * - * @param kind log level to use - * @param cmd command that failed - * @param res postgres result object with error details - */ -#define PQSQL_strerror(kind, cmd, res) \ - GNUNET_log_from (kind, "merchantdb-postgres", \ - "SQL %s failed at %s:%u with error: %s", \ - cmd, __FILE__, __LINE__, PQresultErrorMessage (res)); - - -/** - * Log a really unexpected PQ error. - * - * @param result PQ result object of the PQ operation that failed - */ -#define BREAK_DB_ERR(result) do { \ - GNUNET_break (0); \ - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, \ - "Database failure: %s\n", \ - PQresultErrorMessage (result)); \ - } while (0) - /** * Drop merchant tables |