@@ -5,9 +5,9 @@ INSERT INTO bttest_a SELECT * FROM generate_series(1, 100000);
55INSERT INTO bttest_b SELECT * FROM generate_series(100000, 1, -1);
66CREATE INDEX bttest_a_idx ON bttest_a USING btree (id);
77CREATE INDEX bttest_b_idx ON bttest_b USING btree (id);
8- CREATE ROLE bttest_role ;
8+ CREATE ROLE regress_bttest_role ;
99-- verify permissions are checked (error due to function not callable)
10- SET ROLE bttest_role ;
10+ SET ROLE regress_bttest_role ;
1111SELECT bt_index_check('bttest_a_idx'::regclass);
1212ERROR: permission denied for function bt_index_check
1313SELECT bt_index_parent_check('bttest_a_idx'::regclass);
@@ -16,9 +16,9 @@ RESET ROLE;
1616-- we, intentionally, don't check relation permissions - it's useful
1717-- to run this cluster-wide with a restricted account, and as tested
1818-- above explicit permission has to be granted for that.
19- GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO bttest_role ;
20- GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO bttest_role ;
21- SET ROLE bttest_role ;
19+ GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO regress_bttest_role ;
20+ GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO regress_bttest_role ;
21+ SET ROLE regress_bttest_role ;
2222SELECT bt_index_check('bttest_a_idx');
2323 bt_index_check
2424----------------
@@ -88,5 +88,5 @@ COMMIT;
8888-- cleanup
8989DROP TABLE bttest_a;
9090DROP TABLE bttest_b;
91- DROP OWNED BY bttest_role ; -- permissions
92- DROP ROLE bttest_role ;
91+ DROP OWNED BY regress_bttest_role ; -- permissions
92+ DROP ROLE regress_bttest_role ;
0 commit comments