pgvector
ProDevDb finds vector columns (pgvector) in PostgreSQL and Neon databases. It shows embeddings in a readable form and runs similarity searches.
Requirements
- A PostgreSQL or Neon database with the
vectorextension. - A table with a
vectorcolumn. - A DevDb Pro license.
Find similar rows
- Open a table with a
vectorcolumn. - In a vector cell, click the Find similar rows action.
- The similarity search panel opens. Set the options, then run the search.
Source
Select where the reference vector comes from:
| Source | Description |
|---|---|
| This row | The vector of the cell that you selected |
| Paste vector | A vector that you paste, for example [0.12, 0.44, -0.03] |
| Query text | Text that DevDb sends to an embedding endpoint |
Options
| Option | Description |
|---|---|
| Metric | Cosine (<=>), L2 (<->), Inner product (<#>) or L1 (<+>) |
| Top-k | Number of rows to return |
| Metadata filter | Optional SQL condition, for example tenant_id = 42 AND lang = 'en' |
| ef_search (Advanced) | HNSW search size. A larger value gives better recall and slower queries. |
pgvector returns the negative inner product for <#>. DevDb changes the sign so that a larger value means more similar.
The panel shows the SQL that DevDb ran. Click Copy SQL to use it in your code.
Search by text
To search with text, add an embedding endpoint. DevDb sends your text to the endpoint, gets a vector, and searches with it.
WARNING
Use the same embedding model that created the vectors in your table. Vectors from different models do not compare.
Embedding endpoints
- In the similarity search panel, select Query text.
- Click Add an embedding endpoint to search by text, or click Manage endpoints.
- Enter the details:
| Field | Description |
|---|---|
| Label | A name for the endpoint |
| Provider | OpenAI-compatible, Ollama or Custom |
| URL | The endpoint URL |
| Model | The embedding model, for example text-embedding-3-small or nomic-embed-text |
| API key | Optional. Needed by most hosted services. |
Supported endpoints:
| Provider | URL example |
|---|---|
OpenAI-compatible /v1/embeddings (OpenAI, Azure OpenAI, LM Studio, Together and similar) | https://api.openai.com/v1/embeddings |
Ollama /api/embeddings | http://localhost:11434/api/embeddings |
Endpoint security
- The URL must use
https. DevDb acceptshttponly forlocalhost,127.0.0.1and::1. - DevDb keeps API keys in the secret storage of your editor. It does not send them to the DevDb panel, and it does not show them again after you save.
- DevDb sends an API key only to the origin (scheme, host and port) that you saved it for.