Difference between revisions of "Amazon Redshift: show permissions"

From wikieduonline
Jump to navigation Jump to search
Line 18: Line 18:
  
 
== See also ==
 
== See also ==
 +
* {{GRANT}}
 
* {{Amazon Redshift}}
 
* {{Amazon Redshift}}
  
 
[[Category:Redshift]]
 
[[Category:Redshift]]

Revision as of 09:54, 10 December 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'
;

Related

See also

Advertising: