aru-d-at commented on issue #839:
URL: https://github.com/apache/age/issues/839#issuecomment-1520789029

   @jrgemignani Noted. Thank you!
   
   Do you think it would be within the best interest to have the function 
modified with an argument to connect for non-superuser? Of course they would 
require sufficient privileges as below (possibly few more than listed).
   
   @CC-Hsu So, you'll have to grant privilege as Superuser to the required 
schemas/tables for the non-superuser:
   ```SQL
   GRANT USAGE ON SCHEMA ag_catalog TO tester;
   GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA ag_catalog TO tester;
   
   GRANT USAGE ON SCHEMA test TO tester;
   GRANT ALL PRIVILEGES ON SCHEMA test TO tester;
   GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA test TO tester;
   GRANT ALL PRIVILEGES ON TABLE test._ag_label_vertex TO tester;
   ```
   
   Then, modify your Queries like so:
   ```
   SELECT * FROM ag_catalog.cypher('test', $$
   MATCH (v)
   RETURN v
   $$) as (v ag_catalog.agtype);
   ```
   
   Be aware there will be a failure for the first query. However, subsequent 
queries will be work. [Unfortunately, the fix for this would require you to run 
the `LOAD '$libdir/plugins/age.so'` as the 
non-superuser.](https://github.com/apache/age/issues/41).
   
   If the modified `LOAD` command were run, then the query would not require a 
modification.


-- 
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