pgvector (PostgreSQL and Supabase)¶
hms-import pgvector --dsn ... --table docs --key-column id --map text=content --map vector=embedding --map metadata=meta --map namespace=tenant --map created_at=created_at
- Connection:
--dsn, else$DATABASE_URL, else libpqPG*variables. A Supabase project is a Postgres DSN (use the direct or pooler connection string). The password is registered as a secret and never printed, stored or reported. --tablepages by--key-column(unique, sortable; keysetWHERE key > last), so runs resume from a cursor.--querystreams a server-side cursor and resumes by skipping a verified prefix; give it a stableORDER BY.vectorandhalfveccolumns arrive as[..]text;sparsevec({1:0.5,3:1}/5) is densified.--map metadata=colspreads a jsonb column into metadata keys; other listed columns copy by name; default is every unmapped column.- Identifiers are validated (plain, optionally schema-qualified names only).
Verification: REAL. Postgres 18.4 with pgvector 0.8.7 (vector, halfvec, sparsevec), temporary cluster started by the test. Tests: round trip with assert_faithful, crash/resume, text keys, query mode. Not covered: Supabase-hosted TLS/pooler behavior (same protocol, unverified); other pgvector-compatible forks.