Difference between revisions of "GRANT pg read all data TO xxx;"

From wikieduonline
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
<code>GRANT [[pg_read_all_data]] TO xxx;</code>
+
<code>[[GRANT]] [[pg_read_all_data]] TO xxx;</code> <ref>https://stackoverflow.com/a/67213972</ref>
  
 +
Read all data (tables, views, sequences), as if having SELECT rights on those objects, and USAGE rights on all schemas, even without having it explicitly. This role does not have the role attribute BYPASSRLS set. If RLS is being used, an administrator may wish to set BYPASSRLS on roles which this role is GRANTed to.
 +
 +
 +
:<code>create role USERNAME with login password 'PASSWORD';</code>
 +
:<code>[[GRANT]] [[pg_read_all_data]] TO xxx;</code> <ref>https://stackoverflow.com/a/67213972</ref>
  
 
== Related ==
 
== Related ==
Line 7: Line 12:
 
* <code>[[GRANT SELECT ON ALL TABLES IN SCHEMA]]</code>
 
* <code>[[GRANT SELECT ON ALL TABLES IN SCHEMA]]</code>
 
* [[PostgreSQL predefined roles]]
 
* [[PostgreSQL predefined roles]]
 +
* [[PostgreSQL users]]
  
 
== See also ==
 
== See also ==

Latest revision as of 14:40, 5 July 2023

GRANT pg_read_all_data TO xxx; [1]

Read all data (tables, views, sequences), as if having SELECT rights on those objects, and USAGE rights on all schemas, even without having it explicitly. This role does not have the role attribute BYPASSRLS set. If RLS is being used, an administrator may wish to set BYPASSRLS on roles which this role is GRANTed to.


create role USERNAME with login password 'PASSWORD';
GRANT pg_read_all_data TO xxx; [2]

Related[edit]

See also[edit]

  • https://stackoverflow.com/a/67213972
  • https://stackoverflow.com/a/67213972
  • Advertising: