mirror of
https://github.com/langchain-ai/langchain-postgres.git
synced 2026-07-16 09:54:28 -04:00
[PR #138] Add support to specify custom table schema #186
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?
📋 Pull Request Information
Original PR: https://github.com/langchain-ai/langchain-postgres/pull/138
Author: @anupkg1985
Created: 11/10/2024
Status: 🔄 Open
Base:
main← Head:main📝 Commits (4)
5da6c24Add support to specify custom table schema4c05345Merge branch 'main' into maina232cbfMerge branch 'main' into main7d8c729Merge branch 'main' into main📊 Changes
1 file changed (+11 additions, -5 deletions)
View changed files
📝
langchain_postgres/vectorstores.py(+11 -5)📄 Description
Current
LangChain-Postgresframework, the database table name is hardcoded and defaults to thepublicschema due to the absence of a specified schema name. This limitation affects the flexibility of thePGVectorconnector, restricting its ability to dynamically configure during runtime. This poses significant challenges in multi-tenant architectures, where it's essential for different clients or projects to operate within separate schemas to ensure data isolation and management efficiency. Addressing this issue would involve enabling schema specification, thereby enhancing the connector's versatility and making it more suitable for diverse deployment scenarios.Proposed solution -
table_schemato `PGVector' classpublicschemaDiscussions related to issue -
https://github.com/langchain-ai/langchain/discussions/20877
https://github.com/langchain-ai/langchain/discussions/18883
Example usage -
Default
publicschema -Specify custom table-schema -
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.