From: | David Burns <david(dot)burns(at)fedex(dot)com> |
---|---|
To: | "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> |
Subject: | Version 14/15 documentation Section "Alter Default Privileges" |
Date: | 2022-11-02 19:29:49 |
Message-ID: | LV2PR12MB5725F7C1B8EB2FC38829F276E7399@LV2PR12MB5725.namprd12.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs pgsql-hackers |
To Whom It May Concern;
Some additional clarity in the versions 14/15 documentation would be helpful specifically surrounding the "target_role" clause for the ALTER DEFAULT PRIVILEGES command. To the uninitiated, the current description seems vague. Maybe something like the following would help:
target_role
The name of an existing role of which the current role is a member. Default privileges are only applied to objects created by the targeted role/user (FOR ROLE target_role). If the FOR ROLE clause is omitted, the targeted user defaults to the current user executing the ALTER DEFAULT PRIVILEGES command. The result can be seen using the following query:
select table_catalog as database
,table_schema
,table_name
,privilege_type
,grantee
,'revoke '||privilege_type||' on '||table_schema||'.'||table_name||' from '||grantee||';' as revoke_stmt
from information_schema.table_privileges
where table_schema = 'my_schema'
and table_name = 'my_table'
order by 1,2,3,5,4;
Also, additional explanation about the differences between global defaults versus schema-level defaults, and how to identify them, would be helpful.
Additional explanation about exactly what is happening would help to put this command into perspective. On successful execution with the correct parameter values, and using both the FOR ROLE and IN SCHEMA clauses, I also received privilege grants directed to the user executing the ALTER DEFAULT PRIVILEGES command. This was in addition to the expected privileges specified in the command. I'm not sure why this occurred or how to eliminate it, in the interest of establishing "least privilege" permissions.
Thank you.
David E. Burns, Jr. | Domain Architect | FedEx Services IT | Dock and Edge Services | Mobile 412.304.8303
1000 FedEx Drive, Moon Township, PA 15108 | david(dot)burns(at)fedex(dot)com<mailto:david(dot)burns(at)fedex(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2022-11-03 08:06:20 | Missing documentation |
Previous Message | Laurenz Albe | 2022-11-01 13:43:27 | Re: Partitioned tables are not processed by autovacuum. |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-11-02 20:26:05 | Re: Check SubPlan clause for nonnullable rels/Vars |
Previous Message | Andrew Dunstan | 2022-11-02 19:09:47 | Re: ssl tests aren't concurrency safe due to get_free_port() |