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

Commit65e6d42

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

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

‎contrib/amcheck/expected/check_btree.out

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ CREATE INDEX bttest_a_idx ON bttest_a USING btree (id);
1414
CREATE INDEX bttest_b_idx ON bttest_b USING btree (id);
1515
CREATE UNIQUE INDEX bttest_multi_idx ON bttest_multi
1616
USING btree (id) INCLUDE (data);
17-
CREATE ROLEbttest_role;
17+
CREATE ROLEregress_bttest_role;
1818
-- verify permissions are checked (error due to function not callable)
19-
SET ROLEbttest_role;
19+
SET ROLEregress_bttest_role;
2020
SELECT bt_index_check('bttest_a_idx'::regclass);
2121
ERROR: permission denied for function bt_index_check
2222
SELECT 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) TObttest_role;
29-
GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TObttest_role;
30-
GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TObttest_role;
31-
GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TObttest_role;
32-
SET ROLEbttest_role;
28+
GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TOregress_bttest_role;
29+
GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TOregress_bttest_role;
30+
GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TOregress_bttest_role;
31+
GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TOregress_bttest_role;
32+
SET ROLEregress_bttest_role;
3333
SELECT bt_index_check('bttest_a_idx');
3434
bt_index_check
3535
----------------
@@ -166,5 +166,5 @@ DROP TABLE bttest_b;
166166
DROP TABLE bttest_multi;
167167
DROP TABLE delete_test_table;
168168
DROP TABLE toast_bug;
169-
DROP OWNED BYbttest_role; -- permissions
170-
DROP ROLEbttest_role;
169+
DROP OWNED BYregress_bttest_role; -- permissions
170+
DROP ROLEregress_bttest_role;

‎contrib/amcheck/sql/check_btree.sql

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ CREATE INDEX bttest_b_idx ON bttest_b USING btree (id);
1818
CREATEUNIQUE INDEXbttest_multi_idxON bttest_multi
1919
USING btree (id) INCLUDE (data);
2020

21-
CREATE ROLEbttest_role;
21+
CREATE ROLEregress_bttest_role;
2222

2323
-- verify permissions are checked (error due to function not callable)
24-
SET ROLEbttest_role;
24+
SET ROLEregress_bttest_role;
2525
SELECT bt_index_check('bttest_a_idx'::regclass);
2626
SELECT bt_index_parent_check('bttest_a_idx'::regclass);
2727
RESET ROLE;
2828

2929
-- we, intentionally, don't check relation permissions - it's useful
3030
-- to run this cluster-wide with a restricted account, and as tested
3131
-- above explicit permission has to be granted for that.
32-
GRANT EXECUTEON FUNCTION bt_index_check(regclass) TObttest_role;
33-
GRANT EXECUTEON FUNCTION bt_index_parent_check(regclass) TObttest_role;
34-
GRANT EXECUTEON FUNCTION bt_index_check(regclass,boolean) TObttest_role;
35-
GRANT EXECUTEON FUNCTION bt_index_parent_check(regclass,boolean) TObttest_role;
36-
SET ROLEbttest_role;
32+
GRANT EXECUTEON FUNCTION bt_index_check(regclass) TOregress_bttest_role;
33+
GRANT EXECUTEON FUNCTION bt_index_parent_check(regclass) TOregress_bttest_role;
34+
GRANT EXECUTEON FUNCTION bt_index_check(regclass,boolean) TOregress_bttest_role;
35+
GRANT EXECUTEON FUNCTION bt_index_parent_check(regclass,boolean) TOregress_bttest_role;
36+
SET ROLEregress_bttest_role;
3737
SELECT bt_index_check('bttest_a_idx');
3838
SELECT bt_index_parent_check('bttest_a_idx');
3939
RESET ROLE;
@@ -110,5 +110,5 @@ DROP TABLE bttest_b;
110110
DROPTABLE bttest_multi;
111111
DROPTABLE delete_test_table;
112112
DROPTABLE toast_bug;
113-
DROP OWNED BYbttest_role;-- permissions
114-
DROP ROLEbttest_role;
113+
DROP OWNED BYregress_bttest_role;-- permissions
114+
DROP ROLEregress_bttest_role;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp