@@ -33,8 +33,7 @@ void test_vector(pqxx::connection &conn) {
3333
3434 pqxx::nontransaction tx (conn);
3535 auto embedding = pgvector::Vector ({1 , 2 , 3 });
36- float arr[] = {4 , 5 , 6 };
37- auto embedding2 = pgvector::Vector (std::span{arr, 3 });
36+ auto embedding2 = pgvector::Vector ({4 , 5 , 6 });
3837 tx.exec (" INSERT INTO items (embedding) VALUES ($1), ($2), ($3)" , {embedding, embedding2, std::nullopt });
3938
4039 pqxx::result res = tx.exec (" SELECT embedding FROM items ORDER BY embedding <-> $1" , {embedding2});
@@ -49,8 +48,7 @@ void test_halfvec(pqxx::connection &conn) {
4948
5049 pqxx::nontransaction tx (conn);
5150 auto embedding = pgvector::HalfVector ({1 , 2 , 3 });
52- pgvector::Half arr[] = {4 , 5 , 6 };
53- auto embedding2 = pgvector::HalfVector (std::span{arr, 3 });
51+ auto embedding2 = pgvector::HalfVector ({4 , 5 , 6 });
5452 tx.exec (" INSERT INTO items (half_embedding) VALUES ($1), ($2), ($3)" , {embedding, embedding2, std::nullopt });
5553
5654 pqxx::result res = tx.exec (" SELECT half_embedding FROM items ORDER BY half_embedding <-> $1" , {embedding2});
0 commit comments