Summary
The current PostgreSQL loader in QueryWeaver only supports a single schema when building the database graph. This leads to incomplete or incorrect graph representations for databases that rely on multiple schemas.
Additionally, there is no support for building graphs from multiple databases simultaneously, which limits usability in real-world environments.
Problem Description
1. Single Schema Limitation
The loader extracts the schema using:
schema = PostgresLoader.parse_schema_from_url(connection_url)
However:
parse_schema_from_url only returns the first schema from search_path
- The session is then forced to use only that schema:
SET search_path TO {schema}
Resulting Behavior
- Only one schema is loaded into the graph
- Additional schemas in
search_path are ignored
- Cross-schema relationships are not captured
Impact
This affects many real-world PostgreSQL setups, including:
- Multi-schema architectures (e.g.
auth, billing, analytics)
- Multi-tenant systems
- Modular database designs
- Systems relying on cross-schema foreign keys
The resulting graph is incomplete and potentially misleading.
2. Missing Multi-Database Support
Currently, the loader builds a graph from a single database connection URL.
There is no support for:
- Loading multiple databases into one graph
- Merging schemas across databases
- Representing cross-database relationships (logical or external)
Thanks!
Summary
The current PostgreSQL loader in QueryWeaver only supports a single schema when building the database graph. This leads to incomplete or incorrect graph representations for databases that rely on multiple schemas.
Additionally, there is no support for building graphs from multiple databases simultaneously, which limits usability in real-world environments.
Problem Description
1. Single Schema Limitation
The loader extracts the schema using:
However:
parse_schema_from_urlonly returns the first schema fromsearch_pathResulting Behavior
search_pathare ignoredImpact
This affects many real-world PostgreSQL setups, including:
auth,billing,analytics)The resulting graph is incomplete and potentially misleading.
2. Missing Multi-Database Support
Currently, the loader builds a graph from a single database connection URL.
There is no support for:
Thanks!