Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6928484

Browse files
committed
GRANT rights to CURRENT_USER instead of adding roles
We shouldn't be adding roles during the regression tests as that can cause back-to-back installcheck runs to fail and users running the regression tests likley don't want those extra roles. Pointed out by Tom
1 parent 3308467 commit 6928484

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/test/regress/expected/init_privs.out

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ SELECT count(*) > 0 FROM pg_init_privs;
66
t
77
(1 row)
88

9-
CREATE ROLE init_privs_test_role1;
10-
CREATE ROLE init_privs_test_role2;
119
-- Intentionally include some non-initial privs for pg_dump to dump out
12-
GRANT SELECT ON pg_proc TO init_privs_test_role1;
13-
GRANT SELECT (prosrc) ON pg_proc TO init_privs_test_role2;
10+
GRANT SELECT ON pg_proc TO CURRENT_USER;
11+
GRANT SELECT (prosrc) ON pg_proc TO CURRENT_USER;
12+
GRANT SELECT (rolname, rolsuper) ON pg_authid TO CURRENT_USER;

src/test/regress/sql/init_privs.sql

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
-- There should always be some initial privileges, set up by initdb
44
SELECT count(*) > 0 FROM pg_init_privs;
55

6-
CREATE ROLE init_privs_test_role1;
7-
CREATE ROLE init_privs_test_role2;
8-
96
-- Intentionally include some non-initial privs for pg_dump to dump out
10-
GRANT SELECT ON pg_proc TO init_privs_test_role1;
11-
GRANT SELECT (prosrc) ON pg_proc TO init_privs_test_role2;
7+
GRANT SELECT ON pg_proc TO CURRENT_USER;
8+
GRANT SELECT (prosrc) ON pg_proc TO CURRENT_USER;
9+
10+
GRANT SELECT (rolname, rolsuper) ON pg_authid TO CURRENT_USER;

0 commit comments

Comments
 (0)