Release 0.0.9 missing upsert() (and aupsert()) methods for PGVector object #45

Closed
opened 2026-02-16 05:16:16 -05:00 by yindo · 1 comment
Owner

Originally created by @a-barton on GitHub (Sep 11, 2024).

I switched from the langchain_community.vectorstores.PGVector implementation to this langchain_postgres one because I saw this implementation includes an upsert() method (very handy functionality to have).

Having installed the latest release (version 0.0.9) of the langchain-postgres library though (both locally within an Ubuntu WSL disto, and also within a Docker container), I encountered an error that the PGVector object doesn't have an upsert() method:
image

I checked the local files of the installed version of the library, the vectorstores.py file specifically, I discovered that there indeed wasn't any upsert() method present, despite it clearly existing in the main branch of this GitHub repo.

Was the upsert() method not included in the latest release?

Originally created by @a-barton on GitHub (Sep 11, 2024). I switched from the `langchain_community.vectorstores.PGVector` implementation to this `langchain_postgres` one because I saw this implementation includes an `upsert()` method (very handy functionality to have). Having installed the latest release (version 0.0.9) of the `langchain-postgres` library though (both locally within an Ubuntu WSL disto, and also within a Docker container), I encountered an error that the `PGVector` object doesn't have an `upsert()` method: ![image](https://github.com/user-attachments/assets/8a0059d8-6189-40e4-9f6d-742b5fd27dcb) I checked the local files of the installed version of the library, the `vectorstores.py` file specifically, I discovered that there indeed wasn't any `upsert()` method present, despite it clearly existing in the `main` branch of this GitHub repo. Was the `upsert()` method not included in the latest release?
yindo closed this issue 2026-02-16 05:16:16 -05:00
Author
Owner

@eyurtsev commented on GitHub (Sep 12, 2024):

latest release is not caught up to master.

0.0.10 will not have the upsert method. Instead add_documents and add_texts implement upsert semantics by default when you provide an ID

@eyurtsev commented on GitHub (Sep 12, 2024): latest release is not caught up to master. 0.0.10 will not have the upsert method. Instead `add_documents` and `add_texts` implement upsert semantics by default when you provide an ID
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langchain-postgres#45