Обсуждение: Documentation does not describes format for access privileges: =Tc/user

Поиск
Список
Период
Сортировка

Documentation does not describes format for access privileges: =Tc/user

От
PG Doc comments form
Дата:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/ddl-priv.html
Description:

Hello.
The page https://www.postgresql.org/docs/current/ddl-priv.html does not
describe what =Tc/user means. Also I did not find a link to appropriate page
which describes this.
Specifically I do not understand how 'user=Tc/user' differs from
'=Tc/user'.

It would be nice if documentation will be extended.
Thank you.

Re: Documentation does not describes format for access privileges: =Tc/user

От
"David G. Johnston"
Дата:
On Friday, December 22, 2023, PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/ddl-priv.html
Description:

Hello.
The page https://www.postgresql.org/docs/current/ddl-priv.html does not
describe what =Tc/user means. Also I did not find a link to appropriate page
which describes this.
Specifically I do not understand how 'user=Tc/user' differs from
'=Tc/user'.

It would be nice if documentation will be extended.


The paragraph immediately following table 5.2 describes all of this.

David J.
 

Re: Documentation does not describes format for access privileges: =Tc/user

От
Eugen Konkov
Дата:
No, it does not. If you refer to `An empty grantee field in an aclitem
stands for PUBLIC.` then "grantee field" was never described. What is
this?

It would be very clear if it was described in this way:
The access privileges has the following format: "grantee=privileges/who grants".


On Sun, Dec 24, 2023 at 10:13 AM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Friday, December 22, 2023, PG Doc comments form <noreply@postgresql.org> wrote:
>>
>> The following documentation comment has been logged on the website:
>>
>> Page: https://www.postgresql.org/docs/16/ddl-priv.html
>> Description:
>>
>> Hello.
>> The page https://www.postgresql.org/docs/current/ddl-priv.html does not
>> describe what =Tc/user means. Also I did not find a link to appropriate page
>> which describes this.
>> Specifically I do not understand how 'user=Tc/user' differs from
>> '=Tc/user'.
>>
>> It would be nice if documentation will be extended.
>>
>
> The paragraph immediately following table 5.2 describes all of this.
>
> David J.
>



Re: Documentation does not describes format for access privileges: =Tc/user

От
"David G. Johnston"
Дата:
On Monday, December 25, 2023, Eugen Konkov <konkove@gmail.com> wrote:
No, it does not. If you refer to `An empty grantee field in an aclitem
stands for PUBLIC.` then "grantee field" was never described. What is
this?

It would be very clear if it was described in this way:
The access privileges has the following format: "grantee=privileges/who grants".


Yes, it requires a bit of mental gymnastics to read.  The description says Calvin is the role being granted the privileges which makes that the grantee and Calvin is listed before the equal sign in the reference.

“Who grants” is the “grantor”.

I’ll accept that this can be improved but aside from a dictionary definition of grantee, which we don’t usually do, everything is shown.

David J.


Re: Documentation does not describes format for access privileges: =Tc/user

От
"David G. Johnston"
Дата:
On Monday, December 25, 2023, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Monday, December 25, 2023, Eugen Konkov <konkove@gmail.com> wrote:
No, it does not. If you refer to `An empty grantee field in an aclitem
stands for PUBLIC.` then "grantee field" was never described. What is
this?

It would be very clear if it was described in this way:
The access privileges has the following format: "grantee=privileges/who grants".


Yes, it requires a bit of mental gymnastics to read.  The description says Calvin is the role being granted the privileges which makes that the grantee and Calvin is listed before the equal sign in the reference.

“Who grants” is the “grantor”.

I’ll accept that this can be improved but aside from a dictionary definition of grantee, which we don’t usually do, everything is shown.

We probably should write the syntax like we do everywhere else:

[grantee]={privilege[*]}[…]/grantor

Then define the placeholders in the subsequent paragraph.

David J.

Re: Documentation does not describes format for access privileges: =Tc/user

От
Tom Lane
Дата:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> We probably should write the syntax like we do everywhere else:
> [grantee]={privilege[*]}[…]/grantor
> Then define the placeholders in the subsequent paragraph.

Seems reasonable.  About like this?

            regards, tom lane

diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index d2951cd754..664361a724 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -2318,8 +2318,12 @@ REVOKE ALL ON accounts FROM PUBLIC;
     <primary><type>aclitem</type></primary>
    </indexterm>
    The privileges that have been granted for a particular object are
-   displayed as a list of <type>aclitem</type> entries, where each
-   <type>aclitem</type> describes the permissions of one grantee that
+   displayed as a list of <type>aclitem</type> entries, each having the
+   format:
+<synopsis>

+<replaceable>grantee</replaceable><literal>=</literal><replaceable>privilege-abbreviations</replaceable><literal>/</literal><replaceable>grantor</replaceable>
+</synopsis>
+   Each <type>aclitem</type> describes the permissions of one grantee that
    have been granted by a particular grantor.  For example,
    <literal>calvin=r*w/hobbes</literal> specifies that the role
    <literal>calvin</literal> has the privilege