Skip to content

Commit c53e285

Browse files
committed
Version bump to 0.3.0 [skip ci]
1 parent d58a069 commit c53e285

7 files changed

Lines changed: 16 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 0.3.0 (unreleased)
1+
## 0.3.0 (2026-03-08)
22

33
- Added support for libpqxx 8
44
- Changed `HalfVector` to use `std::float16_t` or `_Float16` when available

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.18)
22

3-
project(pgvector VERSION 0.2.4 LANGUAGES CXX)
3+
project(pgvector VERSION 0.3.0 LANGUAGES CXX)
44

55
include(GNUInstallDirs)
66

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ Supports [libpqxx](https://github.com/jtv/libpqxx)
88

99
## Installation
1010

11-
Add [the headers](https://github.com/pgvector/pgvector-cpp/tree/v0.2.4/include) to your project (supports C++17 and greater).
11+
Add [the headers](https://github.com/pgvector/pgvector-cpp/tree/v0.3.0/include) to your project (supports C++20 and greater).
1212

1313
There is also support for CMake and FetchContent:
1414

1515
```cmake
1616
include(FetchContent)
1717
18-
FetchContent_Declare(pgvector GIT_REPOSITORY https://github.com/pgvector/pgvector-cpp.git GIT_TAG v0.2.4)
18+
FetchContent_Declare(pgvector GIT_REPOSITORY https://github.com/pgvector/pgvector-cpp.git GIT_TAG v0.3.0)
1919
FetchContent_MakeAvailable(pgvector)
2020
2121
target_link_libraries(app PRIVATE pgvector::pgvector)
@@ -46,6 +46,8 @@ Include the header
4646
#include <pgvector/pqxx.hpp>
4747
```
4848

49+
The latest version works libpqxx 8. For libpqxx 7, use version 0.2.4 and [this readme](https://github.com/pgvector/pgvector-cpp/blob/v0.2.4/README.md#libpqxx).
50+
4951
Enable the extension
5052

5153
```cpp
@@ -99,27 +101,29 @@ pgvector::Vector vec{std::span<const float>{{1, 2, 3}}};
99101
Get a `std::vector`
100102

101103
```cpp
102-
std::vector<float> float_vec = static_cast<std::vector<float>>(vec);
104+
const std::vector<float>& values = vec.values();
103105
```
104106

105107
### Half Vectors
106108

107109
Create a half vector from a `std::vector`
108110

109111
```cpp
110-
pgvector::HalfVector vec{std::vector<float>{1, 2, 3}};
112+
pgvector::HalfVector vec{std::vector<pgvector::Half>{1, 2, 3}};
111113
```
112114
115+
Note: `pgvector::Half` is `std::float16_t` or `_Float16` when available, or `float` otherwise
116+
113117
Or a span
114118
115119
```cpp
116-
pgvector::HalfVector vec{std::span<const float>{{1, 2, 3}}};
120+
pgvector::HalfVector vec{std::span<const pgvector::Half>{{1, 2, 3}}};
117121
```
118122

119123
Get a `std::vector`
120124

121125
```cpp
122-
std::vector<float> float_vec = static_cast<std::vector<float>>(vec);
126+
const std::vector<pgvector::Half>& values = vec.values();
123127
```
124128

125129
### Sparse Vectors

include/pgvector/halfvec.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* pgvector-cpp v0.2.4
2+
* pgvector-cpp v0.3.0
33
* https://github.com/pgvector/pgvector-cpp
44
* MIT License
55
*/

include/pgvector/pqxx.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* pgvector-cpp v0.2.4
2+
* pgvector-cpp v0.3.0
33
* https://github.com/pgvector/pgvector-cpp
44
* MIT License
55
*/

include/pgvector/sparsevec.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* pgvector-cpp v0.2.4
2+
* pgvector-cpp v0.3.0
33
* https://github.com/pgvector/pgvector-cpp
44
* MIT License
55
*/

include/pgvector/vector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* pgvector-cpp v0.2.4
2+
* pgvector-cpp v0.3.0
33
* https://github.com/pgvector/pgvector-cpp
44
* MIT License
55
*/

0 commit comments

Comments
 (0)