# PGVectorStore

> **Class** in `langchain_postgres`

📖 [View in docs](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore)

Postgres Vector Store class

## Signature

```python
PGVectorStore(
    self,
    key: object,
    engine: PGEngine,
    vs: AsyncPGVectorStore,
)
```

## Extends

- `VectorStore`

## Constructors

```python
__init__(
    self,
    key: object,
    engine: PGEngine,
    vs: AsyncPGVectorStore,
)
```

| Name | Type |
|------|------|
| `key` | `object` |
| `engine` | `PGEngine` |
| `vs` | `AsyncPGVectorStore` |


## Properties

- `embeddings`

## Methods

- [`create()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/create)
- [`create_sync()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/create_sync)
- [`aadd_embeddings()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/aadd_embeddings)
- [`aadd_texts()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/aadd_texts)
- [`aadd_documents()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/aadd_documents)
- [`add_embeddings()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/add_embeddings)
- [`add_texts()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/add_texts)
- [`add_documents()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/add_documents)
- [`adelete()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/adelete)
- [`delete()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/delete)
- [`afrom_texts()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/afrom_texts)
- [`afrom_documents()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/afrom_documents)
- [`from_texts()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/from_texts)
- [`from_documents()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/from_documents)
- [`similarity_search()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/similarity_search)
- [`asimilarity_search()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/asimilarity_search)
- [`asimilarity_search_with_score()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/asimilarity_search_with_score)
- [`asimilarity_search_by_vector()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/asimilarity_search_by_vector)
- [`asimilarity_search_with_score_by_vector()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/asimilarity_search_with_score_by_vector)
- [`amax_marginal_relevance_search()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/amax_marginal_relevance_search)
- [`amax_marginal_relevance_search_by_vector()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/amax_marginal_relevance_search_by_vector)
- [`amax_marginal_relevance_search_with_score_by_vector()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/amax_marginal_relevance_search_with_score_by_vector)
- [`similarity_search_with_score()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/similarity_search_with_score)
- [`similarity_search_by_vector()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/similarity_search_by_vector)
- [`similarity_search_with_score_by_vector()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/similarity_search_with_score_by_vector)
- [`max_marginal_relevance_search()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/max_marginal_relevance_search)
- [`max_marginal_relevance_search_by_vector()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/max_marginal_relevance_search_by_vector)
- [`max_marginal_relevance_search_with_score_by_vector()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/max_marginal_relevance_search_with_score_by_vector)
- [`aapply_hybrid_search_index()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/aapply_hybrid_search_index)
- [`apply_hybrid_search_index()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/apply_hybrid_search_index)
- [`aapply_vector_index()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/aapply_vector_index)
- [`apply_vector_index()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/apply_vector_index)
- [`areindex()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/areindex)
- [`reindex()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/reindex)
- [`adrop_vector_index()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/adrop_vector_index)
- [`drop_vector_index()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/drop_vector_index)
- [`ais_valid_index()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/ais_valid_index)
- [`is_valid_index()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/is_valid_index)
- [`aget_by_ids()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/aget_by_ids)
- [`get_by_ids()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/get_by_ids)
- [`aget()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/aget)
- [`get()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/get)
- [`get_table_name()`](https://reference.langchain.com/python/langchain-postgres/v2/vectorstores/PGVectorStore/get_table_name)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-postgres/blob/9d819182da7e3fb1b815e6c9a6b7c2cd1eb4bc0e/langchain_postgres/v2/vectorstores.py#L21)