Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8093144

Browse files
committed
Follow the rule that regression-test-created roles are named "regress_xxx".
contrib/amcheck didn't get the memo either.
1 parent131e545 commit8093144

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 ROLEbttest_role;
8+
CREATE ROLEregress_bttest_role;
99
-- verify permissions are checked (error due to function not callable)
10-
SET ROLEbttest_role;
10+
SET ROLEregress_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) TObttest_role;
20-
GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TObttest_role;
21-
SET ROLEbttest_role;
19+
GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TOregress_bttest_role;
20+
GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TOregress_bttest_role;
21+
SET ROLEregress_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 BYbttest_role; -- permissions
92-
DROP ROLEbttest_role;
91+
DROP OWNED BYregress_bttest_role; -- permissions
92+
DROP ROLEregress_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
CREATEINDEXbttest_a_idxON bttest_a USING btree (id);
99
CREATEINDEXbttest_b_idxON bttest_b USING btree (id);
1010

11-
CREATE ROLEbttest_role;
11+
CREATE ROLEregress_bttest_role;
1212

1313
-- verify permissions are checked (error due to function not callable)
14-
SET ROLEbttest_role;
14+
SET ROLEregress_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 EXECUTEON FUNCTION bt_index_check(regclass) TObttest_role;
23-
GRANT EXECUTEON FUNCTION bt_index_parent_check(regclass) TObttest_role;
24-
SET ROLEbttest_role;
22+
GRANT EXECUTEON FUNCTION bt_index_check(regclass) TOregress_bttest_role;
23+
GRANT EXECUTEON FUNCTION bt_index_parent_check(regclass) TOregress_bttest_role;
24+
SET ROLEregress_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
DROPTABLE bttest_a;
5959
DROPTABLE bttest_b;
60-
DROP OWNED BYbttest_role;-- permissions
61-
DROP ROLEbttest_role;
60+
DROP OWNED BYregress_bttest_role;-- permissions
61+
DROP ROLEregress_bttest_role;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp