14.4. Use Case Examples #

Example 14.1. 

To create the mt_admin role, execute the following query:

CREATE USER mt_admin;
GRANT ALL ON SCHEMA metastore TO mt_admin;
ALTER SYSTEM SET duckdb.postgres_role TO 'mt_admin';

Then, reload the server.


Example 14.2. 

To grant the user1 user the privilege to insert the OLAP data in the mt_table1 analytical table from the mt_storage shared directory, execute the following query:

postgres=# GRANT INSERT ON metastore.t_mt_table1_00001 TO user1;
postgres=# GRANT SELECT ON metastore.f_mt_folder to user1;