Skip to content

pgvector ​

Pro

DevDb 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 vector extension.
  • A table with a vector column.
  • A DevDb Pro license.

Find similar rows ​

  1. Open a table with a vector column.
  2. In a vector cell, click the Find similar rows action.
  3. The similarity search panel opens. Set the options, then run the search.

Source ​

Select where the reference vector comes from:

SourceDescription
This rowThe vector of the cell that you selected
Paste vectorA vector that you paste, for example [0.12, 0.44, -0.03]
Query textText that DevDb sends to an embedding endpoint

Options ​

OptionDescription
MetricCosine (<=>), L2 (<->), Inner product (<#>) or L1 (<+>)
Top-kNumber of rows to return
Metadata filterOptional 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 ​

  1. In the similarity search panel, select Query text.
  2. Click Add an embedding endpoint to search by text, or click Manage endpoints.
  3. Enter the details:
FieldDescription
LabelA name for the endpoint
ProviderOpenAI-compatible, Ollama or Custom
URLThe endpoint URL
ModelThe embedding model, for example text-embedding-3-small or nomic-embed-text
API keyOptional. Needed by most hosted services.

Supported endpoints:

ProviderURL example
OpenAI-compatible /v1/embeddings (OpenAI, Azure OpenAI, LM Studio, Together and similar)https://api.openai.com/v1/embeddings
Ollama /api/embeddingshttp://localhost:11434/api/embeddings

Endpoint security ​

  • The URL must use https. DevDb accepts http only for localhost, 127.0.0.1 and ::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.

DevDb - Zero-config database client for VS Code