summaryrefslogtreecommitdiff
path: root/src/backenddb/plugin_merchantdb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-06-27 16:09:29 +0200
committerChristian Grothoff <christian@grothoff.org>2017-06-27 16:09:29 +0200
commit7cbda831aec8525fd7a02ad9495904486f80b1a6 (patch)
tree5adafc0df57cbdba463aea555ef3a2af85c41eea /src/backenddb/plugin_merchantdb_postgres.c
parent90cf9243dd806f2c36eea0439b75cb653b0a1b35 (diff)
downloadmerchant-7cbda831aec8525fd7a02ad9495904486f80b1a6.tar.gz
merchant-7cbda831aec8525fd7a02ad9495904486f80b1a6.tar.bz2
merchant-7cbda831aec8525fd7a02ad9495904486f80b1a6.zip
remove dead macros
Diffstat (limited to 'src/backenddb/plugin_merchantdb_postgres.c')
-rw-r--r--src/backenddb/plugin_merchantdb_postgres.c60
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