Question

I'm trying to use the System Tables to fetch some metadata about the whole Vertica cluster at a table level (including permissions).

Where can I find the information about permissions required to SELECT on a table?

I've poked around in the GRANTS and ROLES system tables, but I can't find any role->table mapping.

I considered using HAS_TABLE_PRIVILEGE() but that does it on user level. I'd rather do it at the role level.

Was it helpful?

Solution

SELECT * FROM grants ORDER BY grantor, grantee;

The privileges_description column shows the privilege types, such as (in your case) SELECT. (If you only want the SELECTs, you can refine that query.)

Source: Viewing Privileges Granted on Objects in the Admin Guide. (That's from the documentation for version 7.1.x.)

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top