patternMinor
Where do I find the tables that a role has access to in Vertica?
Viewed 0 times
tablestheverticawhererolehasthatfindaccess
Problem
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
I considered using
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.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.)
Code Snippets
SELECT * FROM grants ORDER BY grantor, grantee;Context
StackExchange Database Administrators Q#68601, answer score: 4
Revisions (0)
No revisions yet.