Skip to content

Commit 3ae1a20

Browse files
committed
Get rid of unused parameter
1 parent 82ebd7a commit 3ae1a20

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/pgsql.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,14 @@ void pg_conn_t::end_copy(std::string const &context) const
9595
}
9696

9797
pg_result_t pg_conn_t::exec_prepared(char const *stmt, int num_params,
98-
char const *const *param_values,
99-
const ExecStatusType expect) const
98+
char const *const *param_values) const
10099
{
101100
#ifdef DEBUG_PGSQL
102101
fmt::print(stderr, "ExecPrepared: {}\n", stmt);
103102
#endif
104-
//run the prepared statement
105103
pg_result_t res{PQexecPrepared(m_conn.get(), stmt, num_params, param_values,
106104
nullptr, nullptr, 0)};
107-
if (PQresultStatus(res.get()) != expect) {
105+
if (PQresultStatus(res.get()) != PGRES_TUPLES_OK) {
108106
fmt::print(stderr, "Prepared statement failed with: {} ({})\n",
109107
error_msg(), PQresultStatus(res.get()));
110108
fmt::print(stderr, "Query: {}\n", stmt);

src/pgsql.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ class pg_conn_t
102102
explicit pg_conn_t(std::string const &conninfo);
103103

104104
pg_result_t exec_prepared(char const *stmt, int num_params,
105-
char const *const *param_values,
106-
ExecStatusType expect = PGRES_TUPLES_OK) const;
105+
char const *const *param_values) const;
107106

108107
pg_result_t exec_prepared(char const *stmt, char const *param) const;
109108

0 commit comments

Comments
 (0)