Difference between revisions of "Amazon Redshift: show permissions"
Jump to navigation
Jump to search
(Created page with " SELECT u.usename, s.schemaname, has_schema_privilege(u.usename,s.schemaname,'create') AS user_has_select_permission, has_schema_privilege(u.usename,s.sche...") |
|||
Line 5: | Line 5: | ||
has_schema_privilege(u.usename,s.schemaname,'usage') AS user_has_usage_permission | has_schema_privilege(u.usename,s.schemaname,'usage') AS user_has_usage_permission | ||
FROM | FROM | ||
− | pg_user u | + | [[pg_user]] u |
CROSS JOIN | CROSS JOIN | ||
(SELECT DISTINCT schemaname FROM pg_tables) s | (SELECT DISTINCT schemaname FROM pg_tables) s |
Revision as of 10:54, 12 November 2021
SELECT u.usename, s.schemaname, has_schema_privilege(u.usename,s.schemaname,'create') AS user_has_select_permission, has_schema_privilege(u.usename,s.schemaname,'usage') AS user_has_usage_permission FROM pg_user u CROSS JOIN (SELECT DISTINCT schemaname FROM pg_tables) s WHERE u.usename = 'myUserName' AND s.schemaname = 'mySchemaName' ;
See also
Advertising: