Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/test/regress/expected/mdb_superuser.out
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ CREATE DATABASE regress_check_owner OWNER regress_mdb_superuser_user2;
SET ROLE regress_mdb_superuser_user2;
CREATE SCHEMA regtest;
CREATE TABLE regtest.regtest();
GRANT CREATE ON SCHEMA regtest TO regress_mdb_su_role_o2;
-- this should fail
SET ROLE regress_mdb_superuser_user3;
GRANT ALL ON TABLE regtest.regtest TO regress_mdb_superuser_user3;
Expand All @@ -96,9 +97,9 @@ GRANT ALL ON TABLE regtest.regtest TO regress_mdb_superuser_user1;
ALTER TABLE regtest.regtest OWNER TO regress_mdb_superuser_user1;
-- Check grantor
SET ROLE regress_mdb_su_role_o2;
CREATE TABLE public.role_o2_t();
CREATE TABLE regtest.role_o2_t();
SET ROLE mdb_superuser;
GRANT SELECT ON public.role_o2_t TO regress_mdb_su_role_o1;
GRANT SELECT ON regtest.role_o2_t TO regress_mdb_su_role_o1;
SELECT
grantor
from information_schema.role_table_grants
Expand Down
6 changes: 4 additions & 2 deletions src/test/regress/sql/mdb_superuser.sql
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ SET ROLE regress_mdb_superuser_user2;
CREATE SCHEMA regtest;
CREATE TABLE regtest.regtest();

GRANT CREATE ON SCHEMA regtest TO regress_mdb_su_role_o2;

-- this should fail

SET ROLE regress_mdb_superuser_user3;
Expand All @@ -127,11 +129,11 @@ ALTER TABLE regtest.regtest OWNER TO regress_mdb_superuser_user1;

SET ROLE regress_mdb_su_role_o2;

CREATE TABLE public.role_o2_t();
CREATE TABLE regtest.role_o2_t();

SET ROLE mdb_superuser;

GRANT SELECT ON public.role_o2_t TO regress_mdb_su_role_o1;
GRANT SELECT ON regtest.role_o2_t TO regress_mdb_su_role_o1;

SELECT
grantor
Expand Down