Closed uogbuji closed 1 month ago
Hi @uogbuji, added a schema
option in the commit above, so you can do:
from pgvector.asyncpg import register_vector
await register_vector(conn, schema='my_schema')
You could also move the extension to the public
schema with:
ALTER EXTENSION vector SET SCHEMA public;
Oh wow! That's awesome (and quick!) I was kinda wondering whether I was missing a trick with there not being a schema option on register_vector
, so this also helps me with relief that I wasn't out of my mind 😅. Thanks!
Hi, using pgvector for a client who is on the Supabase service (not hosted). I've enabled pgvector for a schema
my_schema
in their console. I want to use asyncpg with it, but it's not working:I get:
I've tried the likes of
and
I've used pgvector a lot in self-hosted PG with no problem, so I do suspect it's something odd about Supabase, and I know that's another support venue, but I do know that Supa is popular, and surely I'm not the only one to be banging their heads against this wall.
For now, I'm having to switch to Supabase’s vecs. I did have to disable the pgvector extension and reenable on the
extensions
schema to get Vecs to work, but that didn't help with my asyncpg problems.Following Vecs code works, in case it helps others. Vecs adds a SQLAlchemy layer, which I don't like, but I guess I’ll just have to deal, unless I can figure out things with asyncpg.