diff --git a/src/age_plotter/services/age_client.py b/src/age_plotter/services/age_client.py index c8f8914..5ac89f7 100644 --- a/src/age_plotter/services/age_client.py +++ b/src/age_plotter/services/age_client.py @@ -19,10 +19,10 @@ async def connect(self) -> None: port=self.config.port, dbname=self.config.database, user=self.config.username, - password=self.config.password, + password=self.config.password ) # Load AGE extension - await self.conn.execute("LOAD 'age';") + await self.conn.execute("LOAD '$libdir/plugins/age.so';") await self.conn.execute("SET search_path = ag_catalog, '$user', public;") async def test_connection(self) -> bool: diff --git a/src/age_plotter/services/query_executor.py b/src/age_plotter/services/query_executor.py index 6c6c7e6..47d588e 100644 --- a/src/age_plotter/services/query_executor.py +++ b/src/age_plotter/services/query_executor.py @@ -414,7 +414,7 @@ async def _execute_age( try: # Load AGE extension - await conn.execute(sql.SQL("LOAD 'age'")) + await conn.execute(sql.SQL("LOAD '$libdir/plugins/age.so'")) await conn.execute(sql.SQL("SET search_path = ag_catalog, '$user', public")) # Get backend PID for cancellation diff --git a/src/age_plotter/services/schema_introspector.py b/src/age_plotter/services/schema_introspector.py index efa4b28..4a88f8e 100644 --- a/src/age_plotter/services/schema_introspector.py +++ b/src/age_plotter/services/schema_introspector.py @@ -56,7 +56,7 @@ async def introspect_age(config: AgeConnection) -> GraphSchema: password=config.password, ) try: - await conn.execute("LOAD 'age';") + await conn.execute("LOAD '$libdir/plugins/age.so';") await conn.execute("SET search_path = ag_catalog, '$user', public;") # Get graph OID