Re: Add sentence about SECURITY LABEL object ownership
Patrick Stählin <me@packi.ch>
From: Patrick Stählin <me@packi.ch>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-docs@lists.postgresql.org
Date: 2025-06-05T15:02:43Z
Lists: pgsql-docs
Attachments
- 0001-Document-ownership-requirement-for-SECURITY-LABEL-v2.patch (text/x-patch) patch v2-0001
On 6/5/25 4:21 PM, Laurenz Albe wrote:
>> +
>> + <para>
>> + You must own the database object to use the <command>SECURITY LABEL</command>.
>> + </para>
>> </refsect1>
>>
>> <refsect1>
>
> Wouldn't it be more accurate to say that you have to be a member of the owning role?
> But perhaps that would be complicated enough to confuse many users.
We're calling check_object_ownership which errors out with:
aclcheck_error(ACLCHECK_NOT_OWNER, [...])
which in turn then aborts with "must be owner of [...]". But checking
the code, we do call has_privs_of_role, so you're absolutely right.
In doc/src/sgml/ref/alter_*.sgml we use the phrase "You must own the
[...]" to describe the privileges needed. Let me know if you want me to
change the wording.
While double checking I noticed that other docs don't have the extra
"the " before "<command>[...] " so I dropped that in my v2 patch.
Thanks for reviewing!
Patrick
Commits
-
Doc: you must own the target object to use SECURITY LABEL.
- 04acad82b0f9 18.0 landed
- 626b439e367d 13.22 landed
- 09498d2f2c73 14.19 landed
- 74637fb79777 15.14 landed
- aad8bd69530b 16.10 landed
- 767d38e2c096 17.6 landed