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
This commit is contained in:
Stephen Frost 2016-04-07 14:40:23 -04:00
parent 3308467905
commit 6928484bda
2 changed files with 7 additions and 9 deletions

View File

@ -6,8 +6,7 @@ SELECT count(*) > 0 FROM pg_init_privs;
t
(1 row)
CREATE ROLE init_privs_test_role1;
CREATE ROLE init_privs_test_role2;
-- Intentionally include some non-initial privs for pg_dump to dump out
GRANT SELECT ON pg_proc TO init_privs_test_role1;
GRANT SELECT (prosrc) ON pg_proc TO init_privs_test_role2;
GRANT SELECT ON pg_proc TO CURRENT_USER;
GRANT SELECT (prosrc) ON pg_proc TO CURRENT_USER;
GRANT SELECT (rolname, rolsuper) ON pg_authid TO CURRENT_USER;

View File

@ -3,9 +3,8 @@
-- There should always be some initial privileges, set up by initdb
SELECT count(*) > 0 FROM pg_init_privs;
CREATE ROLE init_privs_test_role1;
CREATE ROLE init_privs_test_role2;
-- Intentionally include some non-initial privs for pg_dump to dump out
GRANT SELECT ON pg_proc TO init_privs_test_role1;
GRANT SELECT (prosrc) ON pg_proc TO init_privs_test_role2;
GRANT SELECT ON pg_proc TO CURRENT_USER;
GRANT SELECT (prosrc) ON pg_proc TO CURRENT_USER;
GRANT SELECT (rolname, rolsuper) ON pg_authid TO CURRENT_USER;