Skip to content

Commit 2e708e7

Browse files
committed
docs: review
Signed-off-by: Gabriele Bartolini <[email protected]>
1 parent 57fbc82 commit 2e708e7

File tree

2 files changed

+28
-11
lines changed

2 files changed

+28
-11
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ in CloudNativePG.
2020

2121
## Supported Extensions
2222

23-
Currently:
24-
- **pgvector** - Open-source vector similarity search for PostgreSQL
23+
- [pgvector](pgvector) - Open-source vector similarity search for PostgreSQL
2524

2625
---
2726

pgvector/README.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
# PgVector
22

3-
[PgVector](https://github.com/pgvector/pgvector) is an open-source vector similarity search for PostgreSQL.
3+
[PgVector](https://github.com/pgvector/pgvector) is an open-source extension
4+
that enables **vector similarity search** in PostgreSQL.
45

5-
## How It Works
6+
This image provides a convenient way to deploy and manage `pgvector` with
7+
[CloudNativePG](https://cloudnative-pg.io/).
68

7-
To use this extension container image, first add it to your Cluster.
8-
For example:
9+
## Usage
10+
11+
### 1. Add the PgVector extension image to your Cluster
12+
13+
Define the `pgvector` extension under the `postgresql.extensions` section of
14+
your `Cluster` resource. For example:
915

1016
```yaml
1117
apiVersion: postgresql.cnpg.io/v1
@@ -21,13 +27,15 @@ spec:
2127

2228
postgresql:
2329
extensions:
24-
- name: pgvector
25-
image:
26-
reference: ghcr.io/cloudnative-pg/pgvector:0.8.1-18-trixie
30+
- name: pgvector
31+
image:
32+
reference: ghcr.io/cloudnative-pg/pgvector:0.8.1-18-trixie
2733
```
2834
29-
Then, create or add it to an existing Database object to install the extension in a target database.
30-
For example, to add it to the `app` Database:
35+
### 2. Enable the extension in a database
36+
37+
You can install `pgvector` in a specific database by creating or updating a
38+
`Database` resource. For example, to enable it in the `app` database:
3139

3240
```yaml
3341
apiVersion: postgresql.cnpg.io/v1
@@ -42,3 +50,13 @@ spec:
4250
extensions:
4351
- name: vector
4452
```
53+
54+
### 3. Verify installation
55+
56+
Once the database is ready, connect to it with `psql` and run:
57+
58+
```sql
59+
\dx
60+
```
61+
62+
You should see `vector` listed among the installed extensions.

0 commit comments

Comments
 (0)