Browse Source

Follow the rule that regression-test-created roles are named "regress_xxx".

contrib/amcheck didn't get the memo either.
REL_12_STABLE
Tom Lane 2 weeks ago
parent
commit
65e6d42140
2 changed files with 18 additions and 18 deletions
  1. 9
    9
      contrib/amcheck/expected/check_btree.out
  2. 9
    9
      contrib/amcheck/sql/check_btree.sql

+ 9
- 9
contrib/amcheck/expected/check_btree.out View File

@@ -14,9 +14,9 @@ CREATE INDEX bttest_a_idx ON bttest_a USING btree (id);
14 14
 CREATE INDEX bttest_b_idx ON bttest_b USING btree (id);
15 15
 CREATE UNIQUE INDEX bttest_multi_idx ON bttest_multi
16 16
 USING btree (id) INCLUDE (data);
17
-CREATE ROLE bttest_role;
17
+CREATE ROLE regress_bttest_role;
18 18
 -- verify permissions are checked (error due to function not callable)
19
-SET ROLE bttest_role;
19
+SET ROLE regress_bttest_role;
20 20
 SELECT bt_index_check('bttest_a_idx'::regclass);
21 21
 ERROR:  permission denied for function bt_index_check
22 22
 SELECT bt_index_parent_check('bttest_a_idx'::regclass);
@@ -25,11 +25,11 @@ RESET ROLE;
25 25
 -- we, intentionally, don't check relation permissions - it's useful
26 26
 -- to run this cluster-wide with a restricted account, and as tested
27 27
 -- above explicit permission has to be granted for that.
28
-GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO bttest_role;
29
-GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO bttest_role;
30
-GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TO bttest_role;
31
-GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TO bttest_role;
32
-SET ROLE bttest_role;
28
+GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO regress_bttest_role;
29
+GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO regress_bttest_role;
30
+GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TO regress_bttest_role;
31
+GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TO regress_bttest_role;
32
+SET ROLE regress_bttest_role;
33 33
 SELECT bt_index_check('bttest_a_idx');
34 34
  bt_index_check 
35 35
 ----------------
@@ -166,5 +166,5 @@ DROP TABLE bttest_b;
166 166
 DROP TABLE bttest_multi;
167 167
 DROP TABLE delete_test_table;
168 168
 DROP TABLE toast_bug;
169
-DROP OWNED BY bttest_role; -- permissions
170
-DROP ROLE bttest_role;
169
+DROP OWNED BY regress_bttest_role; -- permissions
170
+DROP ROLE regress_bttest_role;

+ 9
- 9
contrib/amcheck/sql/check_btree.sql View File

@@ -18,10 +18,10 @@ CREATE INDEX bttest_b_idx ON bttest_b USING btree (id);
18 18
 CREATE UNIQUE INDEX bttest_multi_idx ON bttest_multi
19 19
 USING btree (id) INCLUDE (data);
20 20
 
21
-CREATE ROLE bttest_role;
21
+CREATE ROLE regress_bttest_role;
22 22
 
23 23
 -- verify permissions are checked (error due to function not callable)
24
-SET ROLE bttest_role;
24
+SET ROLE regress_bttest_role;
25 25
 SELECT bt_index_check('bttest_a_idx'::regclass);
26 26
 SELECT bt_index_parent_check('bttest_a_idx'::regclass);
27 27
 RESET ROLE;
@@ -29,11 +29,11 @@ RESET ROLE;
29 29
 -- we, intentionally, don't check relation permissions - it's useful
30 30
 -- to run this cluster-wide with a restricted account, and as tested
31 31
 -- above explicit permission has to be granted for that.
32
-GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO bttest_role;
33
-GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO bttest_role;
34
-GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TO bttest_role;
35
-GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TO bttest_role;
36
-SET ROLE bttest_role;
32
+GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO regress_bttest_role;
33
+GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO regress_bttest_role;
34
+GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TO regress_bttest_role;
35
+GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TO regress_bttest_role;
36
+SET ROLE regress_bttest_role;
37 37
 SELECT bt_index_check('bttest_a_idx');
38 38
 SELECT bt_index_parent_check('bttest_a_idx');
39 39
 RESET ROLE;
@@ -110,5 +110,5 @@ DROP TABLE bttest_b;
110 110
 DROP TABLE bttest_multi;
111 111
 DROP TABLE delete_test_table;
112 112
 DROP TABLE toast_bug;
113
-DROP OWNED BY bttest_role; -- permissions
114
-DROP ROLE bttest_role;
113
+DROP OWNED BY regress_bttest_role; -- permissions
114
+DROP ROLE regress_bttest_role;

Loading…
Cancel
Save