forked from PostgREST/postgrest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroles.sql
More file actions
28 lines (22 loc) · 1.21 KB
/
Copy pathroles.sql
File metadata and controls
28 lines (22 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
DROP ROLE IF EXISTS
postgrest_test_anonymous, postgrest_test_author,
postgrest_test_serializable, postgrest_test_repeatable_read,
postgrest_test_w_superuser_settings;
CREATE ROLE postgrest_test_anonymous;
CREATE ROLE postgrest_test_author;
CREATE ROLE postgrest_test_serializable;
CREATE ROLE postgrest_test_repeatable_read;
CREATE ROLE postgrest_test_w_superuser_settings;
CREATE ROLE postgrest_test_work_mem;
GRANT
postgrest_test_anonymous, postgrest_test_author,
postgrest_test_serializable, postgrest_test_repeatable_read,
postgrest_test_w_superuser_settings, postgrest_test_work_mem TO :"PGUSER";
ALTER ROLE :"PGUSER" SET pgrst.db_anon_role = 'postgrest_test_anonymous';
ALTER ROLE postgrest_test_serializable SET default_transaction_isolation = 'serializable';
ALTER ROLE postgrest_test_repeatable_read SET default_transaction_isolation = 'REPEATABLE READ';
ALTER ROLE postgrest_test_w_superuser_settings SET log_min_duration_statement = 1;
ALTER ROLE postgrest_test_w_superuser_settings SET log_min_messages = 'fatal';
ALTER ROLE postgrest_test_anonymous SET statement_timeout TO '2s';
ALTER ROLE postgrest_test_author SET statement_timeout TO '10s';
ALTER ROLE postgrest_test_work_mem SET work_mem TO '3MB';