fixed postgres tests
This commit is contained in:
@@ -96,8 +96,8 @@ utils::result<std::unique_ptr<sql::query_result_impl>, utils::error> postgres_co
|
||||
|
||||
std::vector<object::attribute_definition> prototype = context.prototype;
|
||||
|
||||
const auto num_col = PQnfields(res);
|
||||
if (prototype.size() != num_col) {
|
||||
const int num_col = PQnfields(res);
|
||||
if (prototype.size() != static_cast<size_t>(num_col)) {
|
||||
return utils::failure(make_error(sql::error_code::FETCH_FAILED, res, conn_, "Number of received columns doesn't match expected columns.", context.sql));
|
||||
}
|
||||
for (int i = 0; i < num_col; ++i) {
|
||||
@@ -170,7 +170,7 @@ utils::basic_type oid2type(const Oid oid) {
|
||||
return utils::basic_type::type_int32;
|
||||
case 20:
|
||||
return utils::basic_type::type_int64;
|
||||
case 24:
|
||||
case 25:
|
||||
return utils::basic_type::type_text;
|
||||
case 1043:
|
||||
return utils::basic_type::type_varchar;
|
||||
|
||||
Reference in New Issue
Block a user