daanwa commented on code in PR #1926:
URL: https://github.com/apache/age/pull/1926#discussion_r1650448458


##########
drivers/python/age/age.py:
##########
@@ -39,9 +39,13 @@ def load(self, data: bytes | bytearray | memoryview) -> Any 
| None:
         return parseAgeValue(data.decode('utf-8'))
 
 
-def setUpAge(conn:psycopg.connection, graphName:str):
+def setUpAge(conn:psycopg.connection, graphName:str, superuser:bool=True):
     with conn.cursor() as cursor:
-        cursor.execute("LOAD 'age';")
+        if superuser:
+            cursor.execute("LOAD 'age';")
+        else:
+            cursor.execute("LOAD '$libdir/plugins/age';")

Review Comment:
   I'm under the impression that while $libdir may change on the system, the 
"plugins" directory is somewhat static and should only contain plugins that may 
be used by non-super users. So if a DBA installs this in a different directory, 
it won't work either way. However I'm not a DBA and not fully aware of all 
postgres specifics. Perhaps we could leave it like this for now and see if/when 
this requires further configuration options.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to