Difference between revisions of "PostgreSQL read only user"

From wikieduonline
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
* <code>[[CREATE ROLE]] my_username WITH LOGIN PASSWORD '123456'</code>
+
* <code>[[CREATE ROLE]] my_[[readonly]] WITH LOGIN PASSWORD '123456';</code>
 +
* <code>[[GRANT CONNECT on database]] YourDB to my_[[readonly]];</code>
 +
* <code>[[GRANT]] [[pg_read_all_data]], [[pg_monitor]] TO my_readonly;</code>
  
* GRANT [[pg_read_all_data]], [[pg_monitor]] TO xxx;
+
== Related ==
 +
* [[GRANT CONNECT]]
  
 
== See also ==
 
== See also ==

Latest revision as of 16:21, 20 September 2024

Advertising: