OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Type "vector" does not exist on postgresql - langchain/ postgresql

  • Thread starter Thread starter Mohamed Takki
  • Start date Start date
M

Mohamed Takki

Guest
I was trying to embed some documents on postgresql with the help of pgvector extension and langchain. Unfortunately I'm having trouble with the following error:

that's my code langchain python :

from langchain_postgres.vectorstores import PGVector

CONNECTION_STRING = "postgresql+psycopg2://postgres:123@localhost:5432/vector_db"

COLLECTION_NAME = "state_of_doc_vectors"

db = PGVector.from_documents(embedding=embeddings, documents=documents, collection_name=COLLECTION_NAME, connection=CONNECTION_STRING)

Error :

FeatureNotSupported: ERREUR: l'extension « vector » n'est pas disponible DETAIL: Could not open extension control file "C:/Program Files/PostgreSQL/16/share/extension/vector.control": No such file or directory. HINT: Les extensions doivent tout d'abord être installées sur le système où PostgreSQL est exécuté.

and when I execute command : CREATE EXTENSION vector

ERROR: Could not open extension control file "C:/Program Files/PostgreSQL/16/share/extension/vector.control": No such file or directory.l'extension « vector » n'est pas disponible

ERREUR: l'extension « vector » n'est pas disponible SQL state: 0A000 Detail: Could not open extension control file "C:/Program Files/PostgreSQL/16/share/extension/vector.control": No such file or directory.
<p>I was trying to embed some documents on postgresql with the help of pgvector extension and langchain. Unfortunately I'm having trouble with the following error:</p>
<p>that's my code langchain python :</p>
<p>from langchain_postgres.vectorstores import PGVector</p>
<p>CONNECTION_STRING = "postgresql+psycopg2://postgres:123@localhost:5432/vector_db"</p>
<p>COLLECTION_NAME = "state_of_doc_vectors"</p>
<p>db = PGVector.from_documents(embedding=embeddings, documents=documents, collection_name=COLLECTION_NAME, connection=CONNECTION_STRING)</p>
<p>Error :</p>
<p>FeatureNotSupported: ERREUR: l'extension « vector » n'est pas disponible
DETAIL: Could not open extension control file "C:/Program Files/PostgreSQL/16/share/extension/vector.control": No such file or directory.
HINT: Les extensions doivent tout d'abord être installées sur le système où PostgreSQL est exécuté.</p>
<p>and when I execute command : CREATE EXTENSION vector</p>
<p>ERROR: Could not open extension control file "C:/Program Files/PostgreSQL/16/share/extension/vector.control": No such file or directory.l'extension « vector » n'est pas disponible</p>
<p>ERREUR: l'extension « vector » n'est pas disponible
SQL state: 0A000
Detail: Could not open extension control file "C:/Program Files/PostgreSQL/16/share/extension/vector.control": No such file or directory.</p>
 

Latest posts

D
Replies
0
Views
1
Dhanushka Amarakoon
D
S
Replies
0
Views
1
Shikhar Ambashta
S
Top