# pgvector

[BASE product page](<https://base.akulich.dev/en/library/pgvector/>) · [Resource](<https://github.com/pgvector/pgvector>)

ID: pgvector · Language: en
Schema version: 1 · Data version: cbbe7123b47a5ae80983

This is editorial data. An unknown field neither confirms nor rules out a capability.
dataVersion is a dataset fingerprint, not evidence of a recent fact check.

A PostgreSQL extension for vector search: it stores embeddings alongside ordinary tables and adds neighbor\-search indexes\.

## Type

Database / data tool

## Entry type

tool

## Separate catalog

No

## [Access conditions](<https://base.akulich.dev/en/library/pgvector/#resource-access>)

free

## [What you can use for free](<https://base.akulich.dev/en/library/pgvector/#resource-access>)

Installing the extension and running vector queries in your own PostgreSQL\.

## [Paid features and costs](<https://base.akulich.dev/en/library/pgvector/#resource-access>)

Self\-hosting requires compute resources and storage\. Managed PostgreSQL and external embedding generation may have separate paid plans or free terms from the chosen provider; the pgvector license does not pay for them or require purchasing these services\.

## [Access and limitations](<https://base.akulich.dev/en/library/pgvector/#resource-access>)

Installing the extension and running vector queries in your own PostgreSQL\. Self\-hosting requires compute resources and storage\. Managed PostgreSQL and external embedding generation may have separate paid plans or free terms from the chosen provider; the pgvector license does not pay for them or require purchasing these services\.

## [Use cases](<https://base.akulich.dev/en/library/pgvector/#resource-tasks>)

- Add embedding search to PostgreSQL
- Load vectors and check a nearest\-neighbor query with the required index

## Category IDs

- backend

## Subcategory IDs

- backend\.databases
- backend\.search

## Tags

- pgvector
- database
- Development

## Also known as

- pgvector/pgvector
- pgvector
- postgres\-vector
- similarity\-search\-extension

## [Selection purpose](<https://base.akulich.dev/en/library/pgvector/#resource-selection>)

Add embedding search to PostgreSQL

## [Choose this when](<https://base.akulich.dev/en/library/pgvector/#resource-selection>)

- Add embedding search to PostgreSQL
- Load vectors and check a nearest\-neighbor query with the required index

## [Requirements](<https://base.akulich.dev/en/library/pgvector/#resource-selection>)

- Enable the extension with CREATE EXTENSION vector in every required database\. To use an index, the query needs ascending ORDER BY on the distance operator and LIMIT\.

## [Limitations](<https://base.akulich.dev/en/library/pgvector/#resource-selection>)

- Costs and limits of free use: Self\-hosting requires compute resources and storage\. Managed PostgreSQL and external embedding generation may have separate paid plans or free terms from the chosen provider; the pgvector license does not pay for them or require purchasing these services\.
- Terms of use: PostgreSQL License: a permissive extension license, not MIT\.
- With approximate search, WHERE applies after the index scan: results may contain fewer rows\. Iterative scan broadens the search until enough rows are found or the configured limit is reached\.

## [Questions before use](<https://base.akulich.dev/en/library/pgvector/#resource-faq>)

### What can you use for free in pgvector?

Installing the extension and running vector queries in your own PostgreSQL\.

### What additional costs might arise with pgvector?

Self\-hosting requires compute resources and storage\. Managed PostgreSQL and external embedding generation may have separate paid plans or free terms from the chosen provider; the pgvector license does not pay for them or require purchasing these services\.

### What terms of use matter for pgvector?

PostgreSQL License: a permissive extension license, not MIT\.

### How do you get started with pgvector?

Define a vector column and document embedding source\. Load vectors and check a nearest\-neighbor query with the required index\. Check schema changes, indexes, and data recovery\.

### How do exact search and HNSW/IVFFlat indexes differ in pgvector?

Search is exact by default\. HNSW builds a graph without training; IVFFlat trains on data and divides vectors into lists\. Approximate indexes accelerate queries at the cost of recall; search parameters control this tradeoff\.

## Sources for the selection guide

- [https://github\.com/pgvector/pgvector](<https://github.com/pgvector/pgvector>)
- [https://raw\.githubusercontent\.com/pgvector/pgvector/HEAD/README\.md](<https://raw.githubusercontent.com/pgvector/pgvector/HEAD/README.md>)
- [https://raw\.githubusercontent\.com/pgvector/pgvector/HEAD/LICENSE](<https://raw.githubusercontent.com/pgvector/pgvector/HEAD/LICENSE>)
- [https://www\.open\-source\-tools\.com/](<https://www.open-source-tools.com/>)

## [Possible workflow](<https://base.akulich.dev/en/library/pgvector/#resource-scenario>)

Add embedding search to PostgreSQL\.

A possible workflow; this is not a report of hands-on testing.

## Before you start

- A schema, test dataset, and queries\.
- A supported database or runtime\.

## Steps

1. Define a vector column and document embedding source\.
2. Load vectors and check a nearest\-neighbor query with the required index\.
3. Check schema changes, indexes, and data recovery\.

## Check your result

- Query results match the reference data\.
- Check access permissions, backup recovery, and load before production use\.

## [License](<https://base.akulich.dev/en/library/pgvector/#resource-license>)

PostgreSQL License: a permissive extension license, not MIT\.

## License explanations for the specified scope

### Custom license — this product's terms apply

The license name does not imply standard MIT or GPL rights\. Its own text determines permission to modify, work commercially, distribute, and use outputs\. Follow the use case stated for the product above and the primary source for its terms\.

## [Sources](<https://base.akulich.dev/en/library/pgvector/#resource-sources>)

- [Official source](<https://github.com/pgvector/pgvector>)
- [Official source](<https://raw.githubusercontent.com/pgvector/pgvector/HEAD/README.md>)
- [License](<https://raw.githubusercontent.com/pgvector/pgvector/HEAD/LICENSE>)
- [Catalog / discovery source](<https://www.open-source-tools.com/>)

## Editorial review date

2026\-10\-06

## Editorial review scope

Purpose, the current repository license, and the boundaries between code, services, and models were reviewed\. The product was not run or security\-audited\.

Dates refer to the stated editorial review, not hands-on testing, a product update, or a recent review of all sources.
