We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c89ee4 commit a89d566Copy full SHA for a89d566
include/pgvector/pqxx.hpp
@@ -176,9 +176,9 @@ template<> struct string_traits<pgvector::SparseVector> {
176
throw conversion_error{"Malformed sparsevec literal"};
177
}
178
179
- std::unordered_map<int, float> map;
180
int dimensions = pqxx::from_string<int>(text.substr(n + 2), c);
181
+ std::unordered_map<int, float> map;
182
if (n > 1) {
183
std::string_view inner = text.substr(1, n - 1);
184
for (const auto& v : std::views::split(inner, ',')) {
0 commit comments