Skip to content

Commit cbab017

Browse files
committed
Fix create_vector_extension with async
1 parent 7748b92 commit cbab017

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

langchain_postgres/vectorstores.py

-4
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,10 @@ def _results_to_docs(docs_and_scores: Any) -> List[Document]:
231231

232232
def _create_vector_extension(conn: Connection) -> None:
233233
statement = sqlalchemy.text(
234-
"BEGIN;"
235234
"SELECT pg_advisory_xact_lock(1573678846307946496);"
236235
"CREATE EXTENSION IF NOT EXISTS vector;"
237-
"COMMIT;"
238236
)
239237
conn.execute(statement)
240-
conn.commit()
241-
242238

243239
DBConnection = Union[sqlalchemy.engine.Engine, str]
244240

0 commit comments

Comments
 (0)