You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use a docker image timescale/timescaledb-ha:pg17
I've created a table for embeddings:
CREATE TABLE IF NOT EXISTS products.products_embedding ( embedding_id int8 NOT NULL PRIMARY KEY, "text" varchar(255), embedding vector(3072), metadata json );
I've installed a vectorscale extension:
CREATE EXTENSION IF NOT EXISTS vectorscale CASCADE;
That all worked well and I can see the extension created:
SELECT *
FROM pg_extension; - that lists my `vectorscale` and `vector` extensions
Now, when I try to query the db, using Java JPA repository, as in:
@Query(nativeQuery = true, value = "SELECT * FROM products.products_embedding ORDER BY embedding <=> cast('[:embedding]' as vectorscale) LIMIT :limit")
List<ProductsEmbedding> findByEmbedding(List<Float> embedding, int limit);
, that breaks with the following error:
SQL Error [42704]: ERROR: type "vectorscale" does not exist
I get the same result if I plain query in Postgres:
SELECT *
FROM products.argos_products_embedding
ORDER BY embedding <=> cast ('[0.002165521029382944,..(truncated for brievety)..]' as vectorscale)
LIMIT 10;
Why the extension is not found?
BTW, it works if I try
SELECT *
FROM products.argos_products_embedding
ORDER BY embedding <=> cast ('[0.002165521029382944,..(truncated for brievety)..]' as vector)
LIMIT 10;
I have had the 'vectorextension installed earlier on on the same container, and I believevectorscaleis built on top ofvector`, so that works in Postgres.
It still doesn't work in Java though:
@Query(nativeQuery = true, value = "SELECT * FROM products.products_embedding ORDER BY embedding <=> cast('[:embedding]' as vector) LIMIT :limit")
List<ProductsEmbedding> findByEmbedding(List<Float> embedding, int limit);
Still breaks complaining that ERROR: type "vector" does not exist\n Position: 95
pgvectorscale extension affected
0.5.1
PostgreSQL version used
17
What operating system did you use?
MacOs 14.6
What installation method did you use?
Docker
What platform did you run on?
On prem/Self-hosted
Relevant log output and stack trace
SQL Error [42704]: ERROR: type"vectorscale" does not exist
Position: 65766
How can we reproduce the bug?
the steps are in the description
Are you going to work on the bugfix?
🆘 No, could someone else please work on the bugfix?
The text was updated successfully, but these errors were encountered:
There isn't a type named "vectorscale" - we use the same vector type from pgvector. You have to add USING diskann (embedding vector_cosine_ops) when you create the vector index, and then you can make vector queries as normal.
What happened?
I use a docker image timescale/timescaledb-ha:pg17
CREATE TABLE IF NOT EXISTS products.products_embedding ( embedding_id int8 NOT NULL PRIMARY KEY, "text" varchar(255), embedding vector(3072), metadata json );
CREATE EXTENSION IF NOT EXISTS vectorscale CASCADE;
That all worked well and I can see the extension created:
Now, when I try to query the db, using Java JPA repository, as in:
, that breaks with the following error:
SQL Error [42704]: ERROR: type "vectorscale" does not exist
I get the same result if I plain query in Postgres:
Why the extension is not found?
BTW, it works if I try
I have had the 'vector
extension installed earlier on on the same container, and I believe
vectorscaleis built on top of
vector`, so that works in Postgres.It still doesn't work in Java though:
Still breaks complaining that ERROR: type "vector" does not exist\n Position: 95
pgvectorscale extension affected
0.5.1
PostgreSQL version used
17
What operating system did you use?
MacOs 14.6
What installation method did you use?
Docker
What platform did you run on?
On prem/Self-hosted
Relevant log output and stack trace
How can we reproduce the bug?
the steps are in the description
Are you going to work on the bugfix?
🆘 No, could someone else please work on the bugfix?
The text was updated successfully, but these errors were encountered: