pgvector.git / summary / log / commit / refs
commit 7c43b0d8eef3896bc5ff461446a596cc39f4e9c0
Author: Andrew Kane <andrew@ankane.org>
Date: Sat Nov 04 06:54:50 2023 +0000
Updated example [skip ci]
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index c6083128..a7cf5190 100644
--- a/README.md
+++ b/README.md
@@ -416,7 +416,7 @@ You’ll need to use [dimensionality reduction](https://en.wikipedia.org/wiki/Di
You can use `vector` as the type (instead of `vector(3)`).
```sql
-CREATE TABLE embeddings (model_id bigint, item_id bigint, embedding vector);
+CREATE TABLE embeddings (model_id bigint, item_id bigint, embedding vector, PRIMARY KEY (model_id, item_id));
```
However, you can only create indexes on rows with the same number of dimensions (using [expression](https://www.postgresql.org/docs/current/indexes-expressional.html) and [partial](https://www.postgresql.org/docs/current/indexes-partial.html) indexing):
[parent: 7be40036f48f]