Skip to content

Commit 8093144

Browse files
committed
Follow the rule that regression-test-created roles are named "regress_xxx".
contrib/amcheck didn't get the memo either.
1 parent 131e545 commit 8093144

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

contrib/amcheck/expected/check_btree.out

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ INSERT INTO bttest_a SELECT * FROM generate_series(1, 100000);
55
INSERT INTO bttest_b SELECT * FROM generate_series(100000, 1, -1);
66
CREATE INDEX bttest_a_idx ON bttest_a USING btree (id);
77
CREATE 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;
1111
SELECT bt_index_check('bttest_a_idx'::regclass);
1212
ERROR: permission denied for function bt_index_check
1313
SELECT 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;
2222
SELECT bt_index_check('bttest_a_idx');
2323
bt_index_check
2424
----------------
@@ -88,5 +88,5 @@ COMMIT;
8888
-- cleanup
8989
DROP TABLE bttest_a;
9090
DROP 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;

contrib/amcheck/sql/check_btree.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ INSERT INTO bttest_b SELECT * FROM generate_series(100000, 1, -1);
88
CREATE INDEX bttest_a_idx ON bttest_a USING btree (id);
99
CREATE INDEX bttest_b_idx ON bttest_b USING btree (id);
1010

11-
CREATE ROLE bttest_role;
11+
CREATE ROLE regress_bttest_role;
1212

1313
-- verify permissions are checked (error due to function not callable)
14-
SET ROLE bttest_role;
14+
SET ROLE regress_bttest_role;
1515
SELECT bt_index_check('bttest_a_idx'::regclass);
1616
SELECT bt_index_parent_check('bttest_a_idx'::regclass);
1717
RESET ROLE;
1818

1919
-- we, intentionally, don't check relation permissions - it's useful
2020
-- to run this cluster-wide with a restricted account, and as tested
2121
-- above explicit permission has to be granted for that.
22-
GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO bttest_role;
23-
GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO bttest_role;
24-
SET ROLE bttest_role;
22+
GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO regress_bttest_role;
23+
GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO regress_bttest_role;
24+
SET ROLE regress_bttest_role;
2525
SELECT bt_index_check('bttest_a_idx');
2626
SELECT bt_index_parent_check('bttest_a_idx');
2727
RESET ROLE;
@@ -57,5 +57,5 @@ COMMIT;
5757
-- cleanup
5858
DROP TABLE bttest_a;
5959
DROP TABLE bttest_b;
60-
DROP OWNED BY bttest_role; -- permissions
61-
DROP ROLE bttest_role;
60+
DROP OWNED BY regress_bttest_role; -- permissions
61+
DROP ROLE regress_bttest_role;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy