diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-06-25 23:06:17 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-06-25 23:16:35 -0400 |
commit | bf270892f1be2713d47d7a9c452b5ea17d39af8e (patch) | |
tree | ec47ba34544e0f67498d8104a21f94dbacdd718b | |
parent | 52cdbdc42c23e4f9ae1e62e95bd85d11c030d3f6 (diff) | |
download | postgresql-bf270892f1be2713d47d7a9c452b5ea17d39af8e.tar.gz postgresql-bf270892f1be2713d47d7a9c452b5ea17d39af8e.zip |
Follow the rule that regression-test-created roles are named "regress_xxx".
contrib/amcheck didn't get the memo either.
-rw-r--r-- | contrib/amcheck/expected/check_btree.out | 18 | ||||
-rw-r--r-- | contrib/amcheck/sql/check_btree.sql | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/contrib/amcheck/expected/check_btree.out b/contrib/amcheck/expected/check_btree.out index ef5c9e1a1c3..c8a7660ee6a 100644 --- a/contrib/amcheck/expected/check_btree.out +++ b/contrib/amcheck/expected/check_btree.out @@ -14,9 +14,9 @@ CREATE INDEX bttest_a_idx ON bttest_a USING btree (id); CREATE INDEX bttest_b_idx ON bttest_b USING btree (id); CREATE UNIQUE INDEX bttest_multi_idx ON bttest_multi USING btree (id) INCLUDE (data); -CREATE ROLE bttest_role; +CREATE ROLE regress_bttest_role; -- verify permissions are checked (error due to function not callable) -SET ROLE bttest_role; +SET ROLE regress_bttest_role; SELECT bt_index_check('bttest_a_idx'::regclass); ERROR: permission denied for function bt_index_check SELECT bt_index_parent_check('bttest_a_idx'::regclass); @@ -25,11 +25,11 @@ RESET ROLE; -- we, intentionally, don't check relation permissions - it's useful -- to run this cluster-wide with a restricted account, and as tested -- above explicit permission has to be granted for that. -GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO bttest_role; -GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO bttest_role; -GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TO bttest_role; -GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TO bttest_role; -SET ROLE bttest_role; +GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO regress_bttest_role; +GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO regress_bttest_role; +GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TO regress_bttest_role; +GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TO regress_bttest_role; +SET ROLE regress_bttest_role; SELECT bt_index_check('bttest_a_idx'); bt_index_check ---------------- @@ -165,5 +165,5 @@ DROP TABLE bttest_b; DROP TABLE bttest_multi; DROP TABLE delete_test_table; DROP TABLE toast_bug; -DROP OWNED BY bttest_role; -- permissions -DROP ROLE bttest_role; +DROP OWNED BY regress_bttest_role; -- permissions +DROP ROLE regress_bttest_role; diff --git a/contrib/amcheck/sql/check_btree.sql b/contrib/amcheck/sql/check_btree.sql index 0ad1631476d..cd50693b1c9 100644 --- a/contrib/amcheck/sql/check_btree.sql +++ b/contrib/amcheck/sql/check_btree.sql @@ -18,10 +18,10 @@ CREATE INDEX bttest_b_idx ON bttest_b USING btree (id); CREATE UNIQUE INDEX bttest_multi_idx ON bttest_multi USING btree (id) INCLUDE (data); -CREATE ROLE bttest_role; +CREATE ROLE regress_bttest_role; -- verify permissions are checked (error due to function not callable) -SET ROLE bttest_role; +SET ROLE regress_bttest_role; SELECT bt_index_check('bttest_a_idx'::regclass); SELECT bt_index_parent_check('bttest_a_idx'::regclass); RESET ROLE; @@ -29,11 +29,11 @@ RESET ROLE; -- we, intentionally, don't check relation permissions - it's useful -- to run this cluster-wide with a restricted account, and as tested -- above explicit permission has to be granted for that. -GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO bttest_role; -GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO bttest_role; -GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TO bttest_role; -GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TO bttest_role; -SET ROLE bttest_role; +GRANT EXECUTE ON FUNCTION bt_index_check(regclass) TO regress_bttest_role; +GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass) TO regress_bttest_role; +GRANT EXECUTE ON FUNCTION bt_index_check(regclass, boolean) TO regress_bttest_role; +GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TO regress_bttest_role; +SET ROLE regress_bttest_role; SELECT bt_index_check('bttest_a_idx'); SELECT bt_index_parent_check('bttest_a_idx'); RESET ROLE; @@ -109,5 +109,5 @@ DROP TABLE bttest_b; DROP TABLE bttest_multi; DROP TABLE delete_test_table; DROP TABLE toast_bug; -DROP OWNED BY bttest_role; -- permissions -DROP ROLE bttest_role; +DROP OWNED BY regress_bttest_role; -- permissions +DROP ROLE regress_bttest_role; |