+ return GNUNET_DB_STATUS_SOFT_ERROR;
+ }
+ if (0 == strcmp (sqlstate,
+ PQ_DIAG_SQLSTATE_UNIQUE_VIOLATION))
+ {
+ /* Likely no need to retry, INSERT of "same" data. */
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG,
+ "pq",
+ "Query `%s' failed with unique violation: %s/%s/%s/%s/%s\n",
+ statement_name,
+ PQresultErrorField (result,
+ PG_DIAG_MESSAGE_PRIMARY),
+ PQresultErrorField (result,
+ PG_DIAG_MESSAGE_DETAIL),
+ PQresultErrorMessage (result),
+ PQresStatus (PQresultStatus (result)),
+ PQerrorMessage (connection));
+ return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS;