@@ -14,9 +14,9 @@ CREATE INDEX bttest_a_idx ON bttest_a USING btree (id);
1414CREATE INDEX bttest_b_idx ON bttest_b USING btree (id);
1515CREATE UNIQUE INDEX bttest_multi_idx ON bttest_multi
1616USING btree (id) INCLUDE (data);
17- CREATE ROLE bttest_role ;
17+ CREATE ROLE regress_bttest_role ;
1818-- verify permissions are checked (error due to function not callable)
19- SET ROLE bttest_role ;
19+ SET ROLE regress_bttest_role ;
2020SELECT bt_index_check('bttest_a_idx'::regclass);
2121ERROR: permission denied for function bt_index_check
2222SELECT bt_index_parent_check('bttest_a_idx'::regclass);
@@ -25,11 +25,11 @@ RESET ROLE;
2525-- we, intentionally, don't check relation permissions - it's useful
2626-- to run this cluster-wide with a restricted account, and as tested
2727-- 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 ;
3333SELECT bt_index_check('bttest_a_idx');
3434 bt_index_check
3535----------------
@@ -166,5 +166,5 @@ DROP TABLE bttest_b;
166166DROP TABLE bttest_multi;
167167DROP TABLE delete_test_table;
168168DROP 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 ;
0 commit comments