From 3cd649023680bd49f9865fd62474d4db6a9d7c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 14 Jan 2018 21:44:22 +0100 Subject: Remove all the ugly database debug --- src/database/postgresql_statement.hpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/database/postgresql_statement.hpp') diff --git a/src/database/postgresql_statement.hpp b/src/database/postgresql_statement.hpp index 30c3ec2..571c8f1 100644 --- a/src/database/postgresql_statement.hpp +++ b/src/database/postgresql_statement.hpp @@ -96,12 +96,7 @@ private: params.reserve(this->params.size()); for (const auto& param: this->params) - { - log_debug("param:", param); - params.push_back(param.data()); - } - - log_debug("body: ", body); + params.push_back(param.data()); const int param_size = static_cast(this->params.size()); this->result = PQexecParams(this->conn, this->body.data(), param_size, @@ -111,11 +106,7 @@ private: nullptr, 0); const auto status = PQresultStatus(this->result); - if (status == PGRES_TUPLES_OK) - { - log_debug("PGRES_TUPLES_OK"); - } - else if (status != PGRES_COMMAND_OK) + if (status != PGRES_TUPLES_OK && status != PGRES_COMMAND_OK) { log_error("Failed to execute command: ", PQresultErrorMessage(this->result)); return false; -- cgit v1.2.3