Difference between revisions of "GRANT"

From wikieduonline
Jump to navigation Jump to search
Line 31: Line 31:
 
  [[GRANT SELECT ON mytable TO xxx]]
 
  [[GRANT SELECT ON mytable TO xxx]]
  
* List roles: <code>[[\du]]</code>
+
* List roles: <code>[[\du]]</code> or <code>[[SELECT * FROM pg_roles;]]</code>
  
 
[[Amazon Redshift]] system information functions:
 
[[Amazon Redshift]] system information functions:

Revision as of 12:16, 22 April 2022

Examples

SELECT
INSERT
UPDATE
DELETE
TRUNCATE
REFERENCES
TRIGGER
CREATE
CONNECT
TEMPORARY
EXECUTE
USAGE


GRANT USAGE
GRANT USAGE ON ALL SEQUENCES IN SCHEMA your_schema TO mygrp; [1]
GRANT your_defined_role TO your_username;
GRANT ROLE
SELECT * FROM your_table_name;
ERROR: permission denied for table your_table_name
GRANT SELECT ON mytable TO xxx

Amazon Redshift system information functions:


Related terms

See also

  • https://stackoverflow.com/a/10353730
  • https://dba.stackexchange.com/a/184339
  • Advertising: