Skip to content

Commit 37aae6c

Browse files
authored
Merge pull request #2000 from tomhughes/fmt-10
Fix build with v10 of the fmt library
2 parents bc07712 + 86c8b61 commit 37aae6c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pgsql.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <cstdlib>
1818
#include <stdexcept>
1919
#include <string>
20+
#include <type_traits>
2021
#include <utility>
2122

2223
std::size_t pg_result_t::affected_rows() const noexcept
@@ -182,7 +183,8 @@ pg_result_t pg_conn_t::exec_prepared_internal(char const *stmt, int num_params,
182183
if (status != PGRES_COMMAND_OK && status != PGRES_TUPLES_OK) {
183184
log_error("SQL command failed: EXECUTE {}({})", stmt,
184185
concat_params(num_params, param_values));
185-
throw fmt_error("Database error: {} ({})", error_msg(), status);
186+
throw fmt_error("Database error: {} ({})", error_msg(),
187+
std::underlying_type_t<ExecStatusType>(status));
186188
}
187189

188190
return res;

0 commit comments

Comments
 (0)