From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org, mr-russ(at)pws(dot)com(dot)au |
Subject: | Re: Grantor name gets lost when grantor role dropped |
Date: | 2007-04-17 02:44:30 |
Message-ID: | 20070417024430.GF10557@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Jeff Davis wrote:
> CREATE ROLE test_role
> NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;
>
> CREATE ROLE invalid_grantor
> SUPERUSER INHERIT NOCREATEDB NOCREATEROLE;
>
> SET ROLE invalid_grantor;
> GRANT "postgres" TO "test_role";
> SET ROLE postgres;
>
> select * from pg_roles;
>
> select pg_auth_members.*, ur.rolname, gr.rolname from pg_auth_members LEFT JOIN pg_roles ur ON roleid = oid
> LEFT JOIN pg_roles gr ON gr.oid = grantor;
>
> DROP ROLE invalid_grantor;
>
> select pg_auth_members.*, ur.rolname, gr.rolname from pg_auth_members LEFT JOIN pg_roles ur ON roleid = oid
> LEFT JOIN pg_roles gr ON gr.oid = grantor;
>
> DROP ROLE test_role;
The problem here is that we allowed the drop of invalid_grantor. We are
missing a shared dependency on it.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Russell Smith | 2007-04-17 08:02:51 | Re: Grantor name gets lost when grantor role dropped |
Previous Message | Jeff Davis | 2007-04-17 01:59:40 | Grantor name gets lost when grantor role dropped |
From | Date | Subject | |
---|---|---|---|
Next Message | Robins Tharakan | 2007-04-17 03:24:15 | Fwd: Strangely Variable Query Performance |
Previous Message | Andrew Dunstan | 2007-04-17 02:11:08 | Re: [HACKERS] Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch |