mirror of
https://github.com/langchain-ai/langchain-postgres.git
synced 2026-07-16 01:33:18 -04:00
How to use non-async PGEngine? #98
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vlavorini on GitHub (Jan 24, 2026).
Originally assigned to: @dishaprakash on GitHub.
In the notebooks is wrote that all the methods have equivalent sync ones. But I see in the definition of PGEngine that only async is accepted:
@dishaprakash commented on GitHub (Jan 26, 2026):
Hi @vlavorini !
You can create an instance of PGEngine by using this code:
After creating the PGEngine, you can initialize a vector store table in your database using either the synchronous
init_vectorstore_table()method or its asynchronous counterpart,ainit_vectorstore_table().Similarly, the PGVectorStore class offers both sync and async methods to support your workflow. For more info refer to the how-to guide