Difference between revisions of "GRANT"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
* PostgreSQL Documentation: https://www.postgresql.org/docs/current/sql-grant.html
 
* PostgreSQL Documentation: https://www.postgresql.org/docs/current/sql-grant.html
  
Example:
+
== Examples ==
 
* <code>[[GRANT ALL PRIVILEGES]] ON DATABASE YOUR_DB_NAME TO YOUR_USERNAME;</code>
 
* <code>[[GRANT ALL PRIVILEGES]] ON DATABASE YOUR_DB_NAME TO YOUR_USERNAME;</code>
 +
 +
[[SELECT]]
 +
INSERT
 +
UPDATE
 +
DELETE
 +
TRUNCATE
 +
REFERENCES
 +
TRIGGER
 +
CREATE
 +
CONNECT
 +
TEMPORARY
 +
EXECUTE
 +
[[USAGE]]
 +
 +
  
 
* <code>[[GRANT USAGE]]</code>
 
* <code>[[GRANT USAGE]]</code>

Revision as of 13:09, 26 January 2022

Examples

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



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
  • List roles: \du

Amazon Redshift system information functions:


Related terms

See also

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